
using UnityEngine;
using System;
using System.Collections;
using System.Text;

public class MSGID{
    public static int GTCOM_CLIENT_DOWN_RPT = 4100;
    public static int GTCOM_CLIENT_CLOSE_NTF = 4101;
    public static int COM_MSG_NTF = 2;
    public static int CLIBS_GETGT_REQ = 10;
    public static int CLIBS_GETGT_ACK = 11;
    public static int CLIGT_QUEUE_NTF = 30;
    public static int CLICT_QUEUE_UPDATE_NTF = 31;
    public static int CLICT_QUEUEFIN_NTF = 32;
    public static int CLICOM_LOGOUT_REQ = 33;
    public static int CLICOM_LOGOUT_ACK = 34;
    public static int CLICOM_SHUTDOWNCLI_NTF = 35;
    public static int CLICOM_LOCKCLI_NTF = 36;
    public static int CLIDB_VALID_ROLELIST_REQ = 20;
    public static int CLIDB_VALID_ROLELIST_ACK = 21;
    public static int CLIDB_SELECTROLE_REQ = 22;
    public static int CLIDB_SELECTROLE_ACK = 23;
    public static int CLIDB_CREATEROLE_REQ = 80;
    public static int CLIDB_CREATEROLE_ACK = 81;
    public static int CLIDB_DELETEROLE_REQ = 82;
    public static int CLIDB_DELETEROLE_ACK = 83;
    public static int CLIGS_ENTERGS_REQ = 1000;
    public static int CLIGS_ENTERGS_ACK = 1001;
    public static int CLIGS_SELF_INFO_NTF = 1002;
    public static int CLIGS_ROLE_APPEAR_NTF = 1003;
    public static int CLIGS_NPC_APPEAR_NTF = 1004;
    public static int CLIGS_OBJ_DISAPPEAR_NTF = 1005;
    public static int CLIGS_ROLE_MOVE_REQ = 1006;
    public static int CLIGS_ROLE_MOVE_ACK = 1007;
    public static int CLIGS_OBJ_MOVE_NTF = 1008;
    public static int CLIGS_ROLE_DRESS_REQ = 1009;
    public static int CLIGS_ROLE_DRESS_ACK = 1010;
    public static int CLIGS_ROLE_APPEARCHANGE_NTF = 1011;
    public static int CLIGS_SKILL_ATTACK_REQ = 1012;
    public static int CLIGS_SKILL_ATTACK_ACK = 1013;
    public static int CLIGS_SKILL_ATTACK_NTF = 1014;
    public static int CLIGS_CREATURE_SKILLCHANGE_NTF = 1015;
    public static int CLIGS_ROLE_CHAT_REQ = 1016;
    public static int CLIGS_LOADFINISH_RPT = 1017;
    public static int CLIGS_LEAVEGS_REQ = 1018;
    public static int CLIGS_LEAVEGS_ACK = 1019;
    public static int CLIGS_NPC_TALK_REQ = 1020;
    public static int CLIGS_NPC_TALK_ACK = 1021;
    public static int CLIGS_NPC_TALK_OVER_NTF = 1022;
    public static int CLIGS_SYNCTIME_REQ = 1023;
    public static int CLIGS_SYNCTIME_ACK = 1024;
    public static int CLIGS_ROLE_CHANGEDIR_REQ = 1025;
    public static int CLIGS_ROLE_CHANGEDIR_ACK = 1026;
    public static int CLIGS_OBJ_CHANGEDIR_NTF = 1027;
    public static int GSCLI_NPC_EVENT_NTF = 1028;
    public static int CLIGS_SKILL_EFFECT_REQ = 1029;
    public static int GSCLI_SKILL_EFFECT_NTF = 1030;
    public static int CLIGS_ROLE_VELOCITY_REQ = 1031;
    public static int GSCLI_ROLE_VELOCITY_NTF = 1032;
    public static int CLIGS_SKILL_DAMAGE_REQ = 1033;
    public static int GSCLI_SKILL_DAMAGE_NTF = 1034;
    public static int CLIGS_ROLE_ACTION_REQ = 1035;
    public static int GSCLI_ROLE_ACTION_NTF = 1036;
    public static int CLIGS_TASKDETAIL_REQ = 1037;
    public static int CLIGS_TASKDETAIL_ACK = 1038;
    public static int CLIGS_TASKOPERATE_REQ = 1039;
    public static int CLIGS_TASKOPERATE_ACK = 1040;
    public static int CLIGS_TASKREWARD_NTF = 1041;
    public static int CLIGS_TASKBAG_NTF = 1042;
    public static int CLIGS_ITEMSMITHING_REQ = 1043;
    public static int CLIGS_ITEMSMITHING_ACK = 1044;
    public static int CLIGS_ITEMUSE_REQ = 1045;
    public static int CLIGS_ITEMUSE_ACK = 1046;
    public static int CLIGS_SYNROLEPROP_NTF = 1047;
    public static int CLIGS_CREATUREDIE_NTF = 1048;
    public static int CLIGS_CREATUREDAMAGE_NTF = 1049;
    public static int CLIGS_ROLESELFDIE_NTF = 1050;
    public static int CLIGS_PACKGECHANGE_NTF = 1051;
    public static int CLIGS_NPCITEMKINDLST_NTF = 1052;
    public static int CLIGS_NPCITEMSUBLST_REQ = 1053;
    public static int CLIGS_NPCITEMSUBLST_ACK = 1054;
    public static int CLIGS_NPC_TALK_NTF = 1055;
    public static int GSCLI_ROLE_DATA_UPDATE_NTF = 1056;
    public static int GSCLI_FUBEN_MAINSCENE_CHESS_LIST_NTF = 1200;
    public static int CLIGS_ROLE_CHAT_NTF = 1201;
    public static int GSCLI_CHANGE_SCENE_NORMAL_NTF = 1202;
    public static int GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF = 1203;
    public static int GSCLI_SELF_POSITION_NTF = 1204;
    public static int CLIGS_TRIGGER_ACTION_REQ = 1205;
    public static int GSCLI_TRIGGER_ACTION_NTF = 1206;
    public static int GSCLI_TRIGGER_ACTION_ACK = 1207;
    public static int CLIGS_TRIGGER_DAMAGE_REQ = 1208;
    public static int CLIGS_SKILL_EVENT_REQ = 1500;
    public static int GSCLI_SKILL_EVENT_NTF = 1501;
    public static int GSCLI_BEATTACK_EVENT_NTF = 1502;
    public static int CLILS_LOGIN_REQ = 12;
    public static int CLILS_LOGIN_ACK = 13;
    public static int CLIGT_HEARTBEAT_NTF = 1;
}


public class PROTOCOLDEFINE{
    public const int CLIENT_DOWN_LOGOUT = 0;
    public const int CLIENT_DOWN_SHUTDOWN = 1;
    public const int MAX_SCENEID_LEN = 20;
    public const int DBGS_MAX_STATES_IN_ROLE = 80;
    public const int MAX_GOODS_IN_STALL_TOOL = 30;
    public const int PET_MAGIC_LIST_NUMBER = 12;
    public const int PET_SHORT_CUTS_NUMBER = 4;
    public const int MAX_TASK_COUNT = 128;
    public const int MAX_SCENETRIGGER_COUNT = 256;
    public const int MAX_NPC_NAME_LEN = 30;
    public const int MAX_EVERYDAY_DATA_LEN = 30;
    public const int MAX_INITCD_COUNT = 255;
    public const int MAX_LIVE_SKILL_NUM = 6;
    public const int MAX_PEIFANG_NUM = 50;
    public const int DBGS_MAX_SCENE_ARRIVED_COUNT = 256;
    public const int MAX_TIANFU_NODE_NUMBER = 256;
    public const int MAX_TIAN_FU_NUMBER = 256;
    public const int DBGS_DT_FLAGS_MAX = 256;
    public const int MAX_ROLESKILL_COUNT = 64;
    public const int MAX_BODYEQUIPTMENT_COUNT = 12;
    public const int MAX_BODYPACKAGE_COUNT = 64;
    public const int MAX_ROLELIST_COUNT = 5;
    public const int MAX_VALID_ROLELIST_COUNT = 2;
    public const int MAX_ITEM_EXT_NUM = 64;
    public const int MAX_SKILL_EXT_NUM = 64;
    public const int MAX_NPC_TALK_SELECT_LEN = 256;
    public const int MAX_NPC_TALK_LEN = 10240;
    public const int MAX_NPC_FUNC_LEN = 32;
    public const int MAX_NPCITEMKIND_NUM = 64;
    public const int MAX_NPCITEMPERKIND_NUM = 128;
    public const int MAX_TASK_NAME_LEN = 32;
    public const int MAX_TASK_DES_LEN = 256;
    public const int MAX_TASK_COUNT_LEN = 10;
    public const int MAX_TASK_ELEMENT_MAX = 5;
    public const int TASK_STATE_UNACCEPT = 0;
    public const int TASK_STATE_ACCEPT = 1;
    public const int TASK_STATE_FULFIL = 2;
    public const int TASK_STATE_FINISH = 3;
    public const int TASK_STATE_FAILED = 4;
    public const int SUCCESS = 0;
    public const int FAIL = 1;
    public const int INTER = 2;
    public const int SESSIONID_LEN = 8;
    public const int INFO_LEN = 512;
    public const int ORIGINID_LEN = 21;
    public const int PTID_LEN = 21;
    public const int ROLENAME_LEN = 21;
    public const int DIGITID_LEN = 21;
    public const int USERTYPE_LEN = 21;
    public const int MAX_SERVER = 99;
    public const int MAX_QUEUE_LEN = 4096;
    public const int MSG_LEN = 1024;
    public const int MAX_ROLE_INFO_LEN = 1024;
    public const int PACKET_END = -1;
public virtual byte[] GetSendbuf(ref int capacity){return null;}
}


public class PKT_DT_LOGIN_FAIL :PROTOCOLDEFINE
{
    public byte[] Info  = new byte[INFO_LEN];
    public int InfoLen ;
    public int ErrCode ;
    public string ErrMsg  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            
            if(InfoLen > INFO_LEN)
            {
                return null;
            }

            if(InfoLen > Info.Length)
            {
                return null;
            }
            for (int i=0; i<InfoLen; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(Info[i]), 0, c, capacity, sizeof(byte));
                capacity += sizeof(byte);

            }

            Array.Copy(BitConverter.GetBytes(InfoLen), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            //if (256 > ErrMsg.Length)
            //{
            //    return null;
            //}
            short _ErrMsg_length =(short)(ErrMsg.Length);
            Array.Copy(BitConverter.GetBytes(_ErrMsg_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(ErrMsg), 0, c, capacity, _ErrMsg_length);
            capacity += _ErrMsg_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            
            if(InfoLen > INFO_LEN)
            {
                return -1;
            }

            //if(Info.Length > InfoLen)
            //{
            //    return -1;
            //}
            for (int i=0; i<InfoLen; ++i)
            {
                
                Info[i] = (byte)BitConverter.ToChar(recvBuf, indent);
                indent += sizeof(byte);

            }

            InfoLen = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            short _ErrMsg_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_ErrMsg_length>256)
            //{
            //    return -1;
            //}
            ErrMsg = Encoding.ASCII.GetString(recvBuf, indent, _ErrMsg_length);
            indent += _ErrMsg_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        foreach(byte o in Info){UnityEngine.Debug.Log("Info[]: " + o);}
        UnityEngine.Debug.Log("InfoLen: " + InfoLen);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("ErrMsg: " + ErrMsg);
        
    }

}

public class PKT_CLIGS_ENTERGS_REQ :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLIGS_ROLE_MOVE_REQ :PROTOCOLDEFINE
{
    public byte MoveGait ;
    public uint TimeStamp ;
    public Base3dPosition Postion  = new Base3dPosition();
    public byte ActionID ;
    public byte MoveType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(MoveGait), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TimeStamp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _Postion_temp_capacity = 0;
            byte[] _Postion_temp = Postion.GetSendbuf(ref _Postion_temp_capacity);
            if(_Postion_temp == null)
            {
                return null;
            }
            Array.Copy(_Postion_temp, 0, c, capacity, _Postion_temp_capacity);
            capacity += _Postion_temp_capacity;

            Array.Copy(BitConverter.GetBytes(ActionID), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(MoveType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            MoveGait = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TimeStamp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Base3dPosition _Postion = new Base3dPosition();
            int _Postion_indent = _Postion.Parse(recvBuf, indent);
            if (_Postion_indent == -1)
            {
                return -1;
            }
            Postion = _Postion;
            indent = _Postion_indent;

            ActionID = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            MoveType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("MoveGait: " + MoveGait);
        UnityEngine.Debug.Log("TimeStamp: " + TimeStamp);
        UnityEngine.Debug.Log("Postion: ") ;Postion.DebugPrint();
        UnityEngine.Debug.Log("ActionID: " + ActionID);
        UnityEngine.Debug.Log("MoveType: " + MoveType);
        
    }

}

public class PKT_CLIDB_CREATEROLE_REQ :PROTOCOLDEFINE
{
    public string UserID  = "" ;
    public byte Face ;
    public byte Hair ;
    public string UserType  = "" ;
    public byte HairColor ;
    public string RoleName  = "" ;
    public byte Sex ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            Array.Copy(BitConverter.GetBytes(Face), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(Hair), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            Array.Copy(BitConverter.GetBytes(HairColor), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            Array.Copy(BitConverter.GetBytes(Sex), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            Face = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            Hair = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            HairColor = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            Sex = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("Face: " + Face);
        UnityEngine.Debug.Log("Hair: " + Hair);
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("HairColor: " + HairColor);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        UnityEngine.Debug.Log("Sex: " + Sex);
        
    }

}

public class PKT_CLIBS_GETGT_ACK :PROTOCOLDEFINE
{
    public int Count ;
    public DT_SVRINFO[] ServerInfo  = new DT_SVRINFO[MAX_SERVER];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Count), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            
            if(Count > MAX_SERVER)
            {
                return null;
            }

            if(Count > ServerInfo.Length)
            {
                return null;
            }
            for (int i=0; i<Count; ++i)
            {
                
                int _ServerInfo_temp_capacity = 0;
                byte[] _ServerInfo_temp = ServerInfo[i].GetSendbuf(ref _ServerInfo_temp_capacity);
                if(_ServerInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_ServerInfo_temp, 0, c, capacity, _ServerInfo_temp_capacity);
                capacity += _ServerInfo_temp_capacity;

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Count = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            
            if(Count > MAX_SERVER)
            {
                return -1;
            }

            //if(ServerInfo.Length > Count)
            //{
            //    return -1;
            //}
            for (int i=0; i<Count; ++i)
            {
                
                DT_SVRINFO _ServerInfo = new DT_SVRINFO();
                int _ServerInfo_indent = _ServerInfo.Parse(recvBuf, indent);
                if (_ServerInfo_indent == -1)
                {
                    return -1;
                }
                ServerInfo[i] = _ServerInfo;
                indent = _ServerInfo_indent;

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Count: " + Count);
        foreach(DT_SVRINFO o in ServerInfo){UnityEngine.Debug.Log("ServerInfo[]: ") ;o.DebugPrint();}
        
    }

}

public class DT_ATTACKPROP :PROTOCOLDEFINE
{
    public ushort AttackSpeed ;
    public uint MaxMP ;
    public uint MaxHP ;
    public uint MinMagicDamage ;
    public uint PhysicalDefence ;
    public ushort MoveSpeed ;
    public ushort ResumeMp ;
    public byte EvasionRatio ;
    public uint MaxMagicDamage ;
    public uint MaxPhysicalDamage ;
    public ushort ResumeHp ;
    public byte SmashRatio ;
    public uint MinPhysicalDamage ;
    public uint MagicDefence ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(AttackSpeed), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(MaxMP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(MaxHP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(MinMagicDamage), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PhysicalDefence), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(MoveSpeed), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(ResumeMp), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(EvasionRatio), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(MaxMagicDamage), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(MaxPhysicalDamage), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ResumeHp), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(SmashRatio), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(MinPhysicalDamage), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(MagicDefence), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            AttackSpeed = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            MaxMP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            MaxHP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            MinMagicDamage = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PhysicalDefence = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            MoveSpeed = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            ResumeMp = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            EvasionRatio = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            MaxMagicDamage = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            MaxPhysicalDamage = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ResumeHp = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            SmashRatio = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            MinPhysicalDamage = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            MagicDefence = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("AttackSpeed: " + AttackSpeed);
        UnityEngine.Debug.Log("MaxMP: " + MaxMP);
        UnityEngine.Debug.Log("MaxHP: " + MaxHP);
        UnityEngine.Debug.Log("MinMagicDamage: " + MinMagicDamage);
        UnityEngine.Debug.Log("PhysicalDefence: " + PhysicalDefence);
        UnityEngine.Debug.Log("MoveSpeed: " + MoveSpeed);
        UnityEngine.Debug.Log("ResumeMp: " + ResumeMp);
        UnityEngine.Debug.Log("EvasionRatio: " + EvasionRatio);
        UnityEngine.Debug.Log("MaxMagicDamage: " + MaxMagicDamage);
        UnityEngine.Debug.Log("MaxPhysicalDamage: " + MaxPhysicalDamage);
        UnityEngine.Debug.Log("ResumeHp: " + ResumeHp);
        UnityEngine.Debug.Log("SmashRatio: " + SmashRatio);
        UnityEngine.Debug.Log("MinPhysicalDamage: " + MinPhysicalDamage);
        UnityEngine.Debug.Log("MagicDefence: " + MagicDefence);
        
    }

}

public class PKT_CLIGS_ROLESELFDIE_NTF :PROTOCOLDEFINE
{
    public byte Layer ;
    public uint PosZ ;
    public ushort Dir ;
    public uint PosX ;
    public uint PosY ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Layer), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Layer = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            PosZ = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Dir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            PosX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PosY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Layer: " + Layer);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("Dir: " + Dir);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        
    }

}

public class PKT_CLIGS_SKILL_ATTACK_REQ :PROTOCOLDEFINE
{
    public uint AimX ;
    public uint AimY ;
    public uint Target ;
    public ushort AimDir ;
    public ushort SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(AimX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AimY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Target), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AimDir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            AimX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AimY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Target = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AimDir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            SkillID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("AimX: " + AimX);
        UnityEngine.Debug.Log("AimY: " + AimY);
        UnityEngine.Debug.Log("Target: " + Target);
        UnityEngine.Debug.Log("AimDir: " + AimDir);
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class PKT_CLIDB_DELETEROLE_ACK :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public int ErrCode ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLIGS_LEVEL_CHECK :PROTOCOLDEFINE
{
    public uint TargetLevel ;
    public uint CurLevel ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TargetLevel), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(CurLevel), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TargetLevel = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            CurLevel = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TargetLevel: " + TargetLevel);
        UnityEngine.Debug.Log("CurLevel: " + CurLevel);
        
    }

}

public class PKT_CLIGS_OBJ_CHANGEDIR_NTF :PROTOCOLDEFINE
{
    public uint TimeStamp ;
    public uint ObjID ;
    public float Dir ;
    public byte RotateType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TimeStamp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(RotateType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TimeStamp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Dir = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            RotateType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TimeStamp: " + TimeStamp);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        UnityEngine.Debug.Log("Dir: " + Dir);
        UnityEngine.Debug.Log("RotateType: " + RotateType);
        
    }

}

public class PKT_CLIGS_SYNCTIME_ACK :PROTOCOLDEFINE
{
    public uint ClientTickCnt ;
    public int ErrCode ;
    public uint ServerTickCnt ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ClientTickCnt), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(ServerTickCnt), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ClientTickCnt = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            ServerTickCnt = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ClientTickCnt: " + ClientTickCnt);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("ServerTickCnt: " + ServerTickCnt);
        
    }

}

public class PKT_CLIGS_NPC_APPEAR_NTF :PROTOCOLDEFINE
{
    public byte AppearType ;
    public ushort NpcType ;
    public uint ObjID ;
    public CLTDT_SELF_BASEINFO BaseInfo  = new CLTDT_SELF_BASEINFO();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(AppearType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(NpcType), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _BaseInfo_temp_capacity = 0;
            byte[] _BaseInfo_temp = BaseInfo.GetSendbuf(ref _BaseInfo_temp_capacity);
            if(_BaseInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_BaseInfo_temp, 0, c, capacity, _BaseInfo_temp_capacity);
            capacity += _BaseInfo_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            AppearType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            NpcType = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            CLTDT_SELF_BASEINFO _BaseInfo = new CLTDT_SELF_BASEINFO();
            int _BaseInfo_indent = _BaseInfo.Parse(recvBuf, indent);
            if (_BaseInfo_indent == -1)
            {
                return -1;
            }
            BaseInfo = _BaseInfo;
            indent = _BaseInfo_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("AppearType: " + AppearType);
        UnityEngine.Debug.Log("NpcType: " + NpcType);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        UnityEngine.Debug.Log("BaseInfo: ") ;BaseInfo.DebugPrint();
        
    }

}

public class PKT_CLICOM_LOGOUT_REQ :PROTOCOLDEFINE
{
    public byte LogoutType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(LogoutType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            LogoutType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("LogoutType: " + LogoutType);
        
    }

}

public class PKT_CLIGS_OBJ_MOVE_NTF :PROTOCOLDEFINE
{
    public byte MoveGait ;
    public uint TimeStamp ;
    public Base3dPosition Postion  = new Base3dPosition();
    public uint TargetID ;
    public byte ActionID ;
    public byte MoveType ;
    public uint ObjID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(MoveGait), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TimeStamp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _Postion_temp_capacity = 0;
            byte[] _Postion_temp = Postion.GetSendbuf(ref _Postion_temp_capacity);
            if(_Postion_temp == null)
            {
                return null;
            }
            Array.Copy(_Postion_temp, 0, c, capacity, _Postion_temp_capacity);
            capacity += _Postion_temp_capacity;

            Array.Copy(BitConverter.GetBytes(TargetID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ActionID), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(MoveType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            MoveGait = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TimeStamp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Base3dPosition _Postion = new Base3dPosition();
            int _Postion_indent = _Postion.Parse(recvBuf, indent);
            if (_Postion_indent == -1)
            {
                return -1;
            }
            Postion = _Postion;
            indent = _Postion_indent;

            TargetID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ActionID = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            MoveType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("MoveGait: " + MoveGait);
        UnityEngine.Debug.Log("TimeStamp: " + TimeStamp);
        UnityEngine.Debug.Log("Postion: ") ;Postion.DebugPrint();
        UnityEngine.Debug.Log("TargetID: " + TargetID);
        UnityEngine.Debug.Log("ActionID: " + ActionID);
        UnityEngine.Debug.Log("MoveType: " + MoveType);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        
    }

}

public class PKT_CLIGS_SKILL_EVENT_REQ :PROTOCOLDEFINE
{
    public ushort EventID ;
    public ushort TargetCount ;
    public DT_3DPOS Pos  = new DT_3DPOS();
    public uint[] TagetList  = new uint[50];
    public DT_3DPOS Dir  = new DT_3DPOS();
    public uint SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(EventID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(TargetCount), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            int _Pos_temp_capacity = 0;
            byte[] _Pos_temp = Pos.GetSendbuf(ref _Pos_temp_capacity);
            if(_Pos_temp == null)
            {
                return null;
            }
            Array.Copy(_Pos_temp, 0, c, capacity, _Pos_temp_capacity);
            capacity += _Pos_temp_capacity;

            
            if(TargetCount > 50)
            {
                return null;
            }

            if(TargetCount > TagetList.Length)
            {
                return null;
            }
            for (int i=0; i<TargetCount; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(TagetList[i]), 0, c, capacity, sizeof(uint));
                capacity += sizeof(uint);

            }

            int _Dir_temp_capacity = 0;
            byte[] _Dir_temp = Dir.GetSendbuf(ref _Dir_temp_capacity);
            if(_Dir_temp == null)
            {
                return null;
            }
            Array.Copy(_Dir_temp, 0, c, capacity, _Dir_temp_capacity);
            capacity += _Dir_temp_capacity;

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            EventID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            TargetCount = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            DT_3DPOS _Pos = new DT_3DPOS();
            int _Pos_indent = _Pos.Parse(recvBuf, indent);
            if (_Pos_indent == -1)
            {
                return -1;
            }
            Pos = _Pos;
            indent = _Pos_indent;

            
            if(TargetCount > 50)
            {
                return -1;
            }

            //if(TagetList.Length > TargetCount)
            //{
            //    return -1;
            //}
            for (int i=0; i<TargetCount; ++i)
            {
                
                TagetList[i] = BitConverter.ToUInt32(recvBuf, indent);
                indent += sizeof(uint);

            }

            DT_3DPOS _Dir = new DT_3DPOS();
            int _Dir_indent = _Dir.Parse(recvBuf, indent);
            if (_Dir_indent == -1)
            {
                return -1;
            }
            Dir = _Dir;
            indent = _Dir_indent;

            SkillID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("EventID: " + EventID);
        UnityEngine.Debug.Log("TargetCount: " + TargetCount);
        UnityEngine.Debug.Log("Pos: ") ;Pos.DebugPrint();
        foreach(uint o in TagetList){UnityEngine.Debug.Log("TagetList[]: " + o);}
        UnityEngine.Debug.Log("Dir: ") ;Dir.DebugPrint();
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class PKT_CLIGS_ROLE_APPEAR_NTF :PROTOCOLDEFINE
{
    public byte AppearType ;
    public CLTDT_AVATAR_INFO AvatarInfo  = new CLTDT_AVATAR_INFO();
    public uint ObjID ;
    public CLTDT_SELF_BASEINFO BaseInfo  = new CLTDT_SELF_BASEINFO();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(AppearType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            int _AvatarInfo_temp_capacity = 0;
            byte[] _AvatarInfo_temp = AvatarInfo.GetSendbuf(ref _AvatarInfo_temp_capacity);
            if(_AvatarInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_AvatarInfo_temp, 0, c, capacity, _AvatarInfo_temp_capacity);
            capacity += _AvatarInfo_temp_capacity;

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _BaseInfo_temp_capacity = 0;
            byte[] _BaseInfo_temp = BaseInfo.GetSendbuf(ref _BaseInfo_temp_capacity);
            if(_BaseInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_BaseInfo_temp, 0, c, capacity, _BaseInfo_temp_capacity);
            capacity += _BaseInfo_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            AppearType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            CLTDT_AVATAR_INFO _AvatarInfo = new CLTDT_AVATAR_INFO();
            int _AvatarInfo_indent = _AvatarInfo.Parse(recvBuf, indent);
            if (_AvatarInfo_indent == -1)
            {
                return -1;
            }
            AvatarInfo = _AvatarInfo;
            indent = _AvatarInfo_indent;

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            CLTDT_SELF_BASEINFO _BaseInfo = new CLTDT_SELF_BASEINFO();
            int _BaseInfo_indent = _BaseInfo.Parse(recvBuf, indent);
            if (_BaseInfo_indent == -1)
            {
                return -1;
            }
            BaseInfo = _BaseInfo;
            indent = _BaseInfo_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("AppearType: " + AppearType);
        UnityEngine.Debug.Log("AvatarInfo: ") ;AvatarInfo.DebugPrint();
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        UnityEngine.Debug.Log("BaseInfo: ") ;BaseInfo.DebugPrint();
        
    }

}

public class PKT_CLIGS_ROLE_DRESS_REQ :PROTOCOLDEFINE
{
    public ushort PKTPos ;
    public byte Type ;
    public uint DressObjID ;
    public uint UndressObjID ;
    public byte AvatarPos ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(PKTPos), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(Type), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(DressObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(UndressObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AvatarPos), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PKTPos = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            Type = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            DressObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            UndressObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AvatarPos = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("PKTPos: " + PKTPos);
        UnityEngine.Debug.Log("Type: " + Type);
        UnityEngine.Debug.Log("DressObjID: " + DressObjID);
        UnityEngine.Debug.Log("UndressObjID: " + UndressObjID);
        UnityEngine.Debug.Log("AvatarPos: " + AvatarPos);
        
    }

}

public class PKT_CLIGT_QUEUE_NTF :PROTOCOLDEFINE
{
    public int QueueLen ;
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(QueueLen), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            QueueLen = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("QueueLen: " + QueueLen);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class PKT_CLIGS_NPC_TALK_REQ :PROTOCOLDEFINE
{
    public uint NpcID ;
    public string SelectInfo  = "" ;
    public ushort InfoLen ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NpcID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (MAX_NPC_TALK_SELECT_LEN > SelectInfo.Length)
            //{
            //    return null;
            //}
            short _SelectInfo_length =(short)(SelectInfo.Length);
            Array.Copy(BitConverter.GetBytes(_SelectInfo_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(SelectInfo), 0, c, capacity, _SelectInfo_length);
            capacity += _SelectInfo_length;

            Array.Copy(BitConverter.GetBytes(InfoLen), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NpcID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _SelectInfo_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_SelectInfo_length>MAX_NPC_TALK_SELECT_LEN)
            //{
            //    return -1;
            //}
            SelectInfo = Encoding.ASCII.GetString(recvBuf, indent, _SelectInfo_length);
            indent += _SelectInfo_length;

            InfoLen = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NpcID: " + NpcID);
        UnityEngine.Debug.Log("SelectInfo: " + SelectInfo);
        UnityEngine.Debug.Log("InfoLen: " + InfoLen);
        
    }

}

public class PKT_GTCOM_CLIENT_DOWN_RPT :PROTOCOLDEFINE
{
    public byte DownType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DownType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DownType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DownType: " + DownType);
        
    }

}

public class PKT_CLIGS_ARRIVE_CHECK :PROTOCOLDEFINE
{
    public uint CurrentY ;
    public uint CurrentX ;
    public uint TargetX ;
    public uint TargetY ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(CurrentY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(CurrentX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            CurrentY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            CurrentX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("CurrentY: " + CurrentY);
        UnityEngine.Debug.Log("CurrentX: " + CurrentX);
        UnityEngine.Debug.Log("TargetX: " + TargetX);
        UnityEngine.Debug.Log("TargetY: " + TargetY);
        
    }

}

public class PKT_GSCLI_TRIGGER_ACTION_NTF :PROTOCOLDEFINE
{
    public uint TriggerEntityID ;
    public uint TriggerRole ;
    public uint Para1 ;
    public string Para3  = "" ;
    public uint Para2 ;
    public uint TriggerID ;
    public string Para4  = "" ;
    public uint TriggerActionID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TriggerEntityID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TriggerRole), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Para1), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (32 > Para3.Length)
            //{
            //    return null;
            //}
            short _Para3_length =(short)(Para3.Length);
            Array.Copy(BitConverter.GetBytes(_Para3_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Para3), 0, c, capacity, _Para3_length);
            capacity += _Para3_length;

            Array.Copy(BitConverter.GetBytes(Para2), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TriggerID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (32 > Para4.Length)
            //{
            //    return null;
            //}
            short _Para4_length =(short)(Para4.Length);
            Array.Copy(BitConverter.GetBytes(_Para4_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Para4), 0, c, capacity, _Para4_length);
            capacity += _Para4_length;

            Array.Copy(BitConverter.GetBytes(TriggerActionID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TriggerEntityID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TriggerRole = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Para1 = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _Para3_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Para3_length>32)
            //{
            //    return -1;
            //}
            Para3 = Encoding.ASCII.GetString(recvBuf, indent, _Para3_length);
            indent += _Para3_length;

            Para2 = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TriggerID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _Para4_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Para4_length>32)
            //{
            //    return -1;
            //}
            Para4 = Encoding.ASCII.GetString(recvBuf, indent, _Para4_length);
            indent += _Para4_length;

            TriggerActionID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TriggerEntityID: " + TriggerEntityID);
        UnityEngine.Debug.Log("TriggerRole: " + TriggerRole);
        UnityEngine.Debug.Log("Para1: " + Para1);
        UnityEngine.Debug.Log("Para3: " + Para3);
        UnityEngine.Debug.Log("Para2: " + Para2);
        UnityEngine.Debug.Log("TriggerID: " + TriggerID);
        UnityEngine.Debug.Log("Para4: " + Para4);
        UnityEngine.Debug.Log("TriggerActionID: " + TriggerActionID);
        
    }

}

public class DT_QUEUEINFO :PROTOCOLDEFINE
{
    public uint SessionID ;
    public uint Number ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(SessionID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Number), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            SessionID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Number = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("SessionID: " + SessionID);
        UnityEngine.Debug.Log("Number: " + Number);
        
    }

}

public class PKT_CLIGS_LEAVEGS_REQ :PROTOCOLDEFINE
{
    public string RoleName  = "" ;
    public string UserID  = "" ;
    public string UserType  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("UserType: " + UserType);
        
    }

}

public class PKT_CLIGT_HEARTBEAT_NTF :PROTOCOLDEFINE
{
    public byte ExtInfo ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ExtInfo), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ExtInfo = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ExtInfo: " + ExtInfo);
        
    }

}

public class PKT_CLIGS_NPC_TALK_REPLY :PROTOCOLDEFINE
{
    public PKT_CLIGS_NPC_TALK_FAIL Fail  = new PKT_CLIGS_NPC_TALK_FAIL();
    public PKT_CLIGS_NPC_TALK_SUCC Succ  = new PKT_CLIGS_NPC_TALK_SUCC();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _Fail_temp_capacity = 0;
            byte[] _Fail_temp = Fail.GetSendbuf(ref _Fail_temp_capacity);
            if(_Fail_temp == null)
            {
                return null;
            }
            Array.Copy(_Fail_temp, 0, c, capacity, _Fail_temp_capacity);
            capacity += _Fail_temp_capacity;

            int _Succ_temp_capacity = 0;
            byte[] _Succ_temp = Succ.GetSendbuf(ref _Succ_temp_capacity);
            if(_Succ_temp == null)
            {
                return null;
            }
            Array.Copy(_Succ_temp, 0, c, capacity, _Succ_temp_capacity);
            capacity += _Succ_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PKT_CLIGS_NPC_TALK_FAIL _Fail = new PKT_CLIGS_NPC_TALK_FAIL();
            int _Fail_indent = _Fail.Parse(recvBuf, indent);
            if (_Fail_indent == -1)
            {
                return -1;
            }
            Fail = _Fail;
            indent = _Fail_indent;

            PKT_CLIGS_NPC_TALK_SUCC _Succ = new PKT_CLIGS_NPC_TALK_SUCC();
            int _Succ_indent = _Succ.Parse(recvBuf, indent);
            if (_Succ_indent == -1)
            {
                return -1;
            }
            Succ = _Succ;
            indent = _Succ_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Fail: ") ;Fail.DebugPrint();
        UnityEngine.Debug.Log("Succ: ") ;Succ.DebugPrint();
        
    }

}

public class PKT_CLIBS_GETGT_REQ :PROTOCOLDEFINE
{
    public ushort AreaID ;
    public ushort ServerType ;
    public ushort GroupID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(AreaID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(ServerType), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(GroupID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            AreaID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            ServerType = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            GroupID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("AreaID: " + AreaID);
        UnityEngine.Debug.Log("ServerType: " + ServerType);
        UnityEngine.Debug.Log("GroupID: " + GroupID);
        
    }

}

public class PKT_GSCLI_SELF_POSITION_NTF :PROTOCOLDEFINE
{
    public Base3dPosition Pos  = new Base3dPosition();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _Pos_temp_capacity = 0;
            byte[] _Pos_temp = Pos.GetSendbuf(ref _Pos_temp_capacity);
            if(_Pos_temp == null)
            {
                return null;
            }
            Array.Copy(_Pos_temp, 0, c, capacity, _Pos_temp_capacity);
            capacity += _Pos_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Base3dPosition _Pos = new Base3dPosition();
            int _Pos_indent = _Pos.Parse(recvBuf, indent);
            if (_Pos_indent == -1)
            {
                return -1;
            }
            Pos = _Pos;
            indent = _Pos_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Pos: ") ;Pos.DebugPrint();
        
    }

}

public class PKT_CLIGS_NPC_TALK_NTF :PROTOCOLDEFINE
{
    public uint NpcObjID ;
    public string Context  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NpcObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (MAX_NPC_TALK_LEN > Context.Length)
            //{
            //    return null;
            //}
            short _Context_length =(short)(Context.Length);
            Array.Copy(BitConverter.GetBytes(_Context_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Context), 0, c, capacity, _Context_length);
            capacity += _Context_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NpcObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _Context_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Context_length>MAX_NPC_TALK_LEN)
            //{
            //    return -1;
            //}
            Context = Encoding.ASCII.GetString(recvBuf, indent, _Context_length);
            indent += _Context_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NpcObjID: " + NpcObjID);
        UnityEngine.Debug.Log("Context: " + Context);
        
    }

}

public class CLTDT_AVATAR_INFO :PROTOCOLDEFINE
{
    public byte Hair ;
    public byte HairColor ;
    public uint[] ItemKindIDs  = new uint[MAX_BODYEQUIPTMENT_COUNT];
    public byte Face ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Hair), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(HairColor), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            
            if(MAX_BODYEQUIPTMENT_COUNT > ItemKindIDs.Length)
            {
                return null;
            }
            for (int i=0; i<MAX_BODYEQUIPTMENT_COUNT; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(ItemKindIDs[i]), 0, c, capacity, sizeof(uint));
                capacity += sizeof(uint);

            }

            Array.Copy(BitConverter.GetBytes(Face), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Hair = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            HairColor = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            
            //if(ItemKindIDs.Length > MAX_BODYEQUIPTMENT_COUNT)
            //{
            //    return -1;
            //}
            for (int i=0; i<MAX_BODYEQUIPTMENT_COUNT; ++i)
            {
                
                ItemKindIDs[i] = BitConverter.ToUInt32(recvBuf, indent);
                indent += sizeof(uint);

            }

            Face = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Hair: " + Hair);
        UnityEngine.Debug.Log("HairColor: " + HairColor);
        foreach(uint o in ItemKindIDs){UnityEngine.Debug.Log("ItemKindIDs[]: " + o);}
        UnityEngine.Debug.Log("Face: " + Face);
        
    }

}

public class CLTDT_CLIGS_TASK_CONTENT :PROTOCOLDEFINE
{
    public string TaskName  = "" ;
    public uint TaskMoney ;
    public string TaskDes  = "" ;
    public uint TaskExp ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (MAX_TASK_NAME_LEN > TaskName.Length)
            //{
            //    return null;
            //}
            short _TaskName_length =(short)(TaskName.Length);
            Array.Copy(BitConverter.GetBytes(_TaskName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(TaskName), 0, c, capacity, _TaskName_length);
            capacity += _TaskName_length;

            Array.Copy(BitConverter.GetBytes(TaskMoney), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (MAX_TASK_DES_LEN > TaskDes.Length)
            //{
            //    return null;
            //}
            short _TaskDes_length =(short)(TaskDes.Length);
            Array.Copy(BitConverter.GetBytes(_TaskDes_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(TaskDes), 0, c, capacity, _TaskDes_length);
            capacity += _TaskDes_length;

            Array.Copy(BitConverter.GetBytes(TaskExp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _TaskName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_TaskName_length>MAX_TASK_NAME_LEN)
            //{
            //    return -1;
            //}
            TaskName = Encoding.ASCII.GetString(recvBuf, indent, _TaskName_length);
            indent += _TaskName_length;

            TaskMoney = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _TaskDes_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_TaskDes_length>MAX_TASK_DES_LEN)
            //{
            //    return -1;
            //}
            TaskDes = Encoding.ASCII.GetString(recvBuf, indent, _TaskDes_length);
            indent += _TaskDes_length;

            TaskExp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskName: " + TaskName);
        UnityEngine.Debug.Log("TaskMoney: " + TaskMoney);
        UnityEngine.Debug.Log("TaskDes: " + TaskDes);
        UnityEngine.Debug.Log("TaskExp: " + TaskExp);
        
    }

}

public class PKT_CLICT_QUEUE_UPDATE_NTF :PROTOCOLDEFINE
{
    public int Count ;
    public DT_QUEUEINFO[] QueueInfo  = new DT_QUEUEINFO[MAX_QUEUE_LEN];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Count), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            
            if(Count > MAX_QUEUE_LEN)
            {
                return null;
            }

            if(Count > QueueInfo.Length)
            {
                return null;
            }
            for (int i=0; i<Count; ++i)
            {
                
                int _QueueInfo_temp_capacity = 0;
                byte[] _QueueInfo_temp = QueueInfo[i].GetSendbuf(ref _QueueInfo_temp_capacity);
                if(_QueueInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_QueueInfo_temp, 0, c, capacity, _QueueInfo_temp_capacity);
                capacity += _QueueInfo_temp_capacity;

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Count = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            
            if(Count > MAX_QUEUE_LEN)
            {
                return -1;
            }

            //if(QueueInfo.Length > Count)
            //{
            //    return -1;
            //}
            for (int i=0; i<Count; ++i)
            {
                
                DT_QUEUEINFO _QueueInfo = new DT_QUEUEINFO();
                int _QueueInfo_indent = _QueueInfo.Parse(recvBuf, indent);
                if (_QueueInfo_indent == -1)
                {
                    return -1;
                }
                QueueInfo[i] = _QueueInfo;
                indent = _QueueInfo_indent;

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Count: " + Count);
        foreach(DT_QUEUEINFO o in QueueInfo){UnityEngine.Debug.Log("QueueInfo[]: ") ;o.DebugPrint();}
        
    }

}

public class PKT_CLIGS_NPCITEMSUBLST_ACK :PROTOCOLDEFINE
{
    public ushort ItemNum ;
    public DT_ITEMINFO[] ItemInfo  = new DT_ITEMINFO[MAX_NPCITEMPERKIND_NUM];
    public uint NpcObjID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ItemNum), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            
            if(ItemNum > MAX_NPCITEMPERKIND_NUM)
            {
                return null;
            }

            if(ItemNum > ItemInfo.Length)
            {
                return null;
            }
            for (int i=0; i<ItemNum; ++i)
            {
                
                int _ItemInfo_temp_capacity = 0;
                byte[] _ItemInfo_temp = ItemInfo[i].GetSendbuf(ref _ItemInfo_temp_capacity);
                if(_ItemInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_ItemInfo_temp, 0, c, capacity, _ItemInfo_temp_capacity);
                capacity += _ItemInfo_temp_capacity;

            }

            Array.Copy(BitConverter.GetBytes(NpcObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ItemNum = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            
            if(ItemNum > MAX_NPCITEMPERKIND_NUM)
            {
                return -1;
            }

            //if(ItemInfo.Length > ItemNum)
            //{
            //    return -1;
            //}
            for (int i=0; i<ItemNum; ++i)
            {
                
                DT_ITEMINFO _ItemInfo = new DT_ITEMINFO();
                int _ItemInfo_indent = _ItemInfo.Parse(recvBuf, indent);
                if (_ItemInfo_indent == -1)
                {
                    return -1;
                }
                ItemInfo[i] = _ItemInfo;
                indent = _ItemInfo_indent;

            }

            NpcObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ItemNum: " + ItemNum);
        foreach(DT_ITEMINFO o in ItemInfo){UnityEngine.Debug.Log("ItemInfo[]: ") ;o.DebugPrint();}
        UnityEngine.Debug.Log("NpcObjID: " + NpcObjID);
        
    }

}

public class Base3dPosition :PROTOCOLDEFINE
{
    public float VelocityZ ;
    public float VelocityX ;
    public float VelocityY ;
    public byte Layer ;
    public float PosZ ;
    public float PosX ;
    public float PosY ;
    public float Dir ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(VelocityZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(VelocityX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(VelocityY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(Layer), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            VelocityZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            VelocityX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            VelocityY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            Layer = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            PosZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            Dir = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("VelocityZ: " + VelocityZ);
        UnityEngine.Debug.Log("VelocityX: " + VelocityX);
        UnityEngine.Debug.Log("VelocityY: " + VelocityY);
        UnityEngine.Debug.Log("Layer: " + Layer);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        UnityEngine.Debug.Log("Dir: " + Dir);
        
    }

}

public class PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF :PROTOCOLDEFINE
{
    public FUBEN_MAINSCENE_CHESS_INFO[] Chesses  = new FUBEN_MAINSCENE_CHESS_INFO[50];
    public ushort ChessCount ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            
            if(ChessCount > 50)
            {
                return null;
            }

            if(ChessCount > Chesses.Length)
            {
                return null;
            }
            for (int i=0; i<ChessCount; ++i)
            {
                
                int _Chesses_temp_capacity = 0;
                byte[] _Chesses_temp = Chesses[i].GetSendbuf(ref _Chesses_temp_capacity);
                if(_Chesses_temp == null)
                {
                    return null;
                }
                Array.Copy(_Chesses_temp, 0, c, capacity, _Chesses_temp_capacity);
                capacity += _Chesses_temp_capacity;

            }

            Array.Copy(BitConverter.GetBytes(ChessCount), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            
            if(ChessCount > 50)
            {
                return -1;
            }

            //if(Chesses.Length > ChessCount)
            //{
            //    return -1;
            //}
            for (int i=0; i<ChessCount; ++i)
            {
                
                FUBEN_MAINSCENE_CHESS_INFO _Chesses = new FUBEN_MAINSCENE_CHESS_INFO();
                int _Chesses_indent = _Chesses.Parse(recvBuf, indent);
                if (_Chesses_indent == -1)
                {
                    return -1;
                }
                Chesses[i] = _Chesses;
                indent = _Chesses_indent;

            }

            ChessCount = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        foreach(FUBEN_MAINSCENE_CHESS_INFO o in Chesses){UnityEngine.Debug.Log("Chesses[]: ") ;o.DebugPrint();}
        UnityEngine.Debug.Log("ChessCount: " + ChessCount);
        
    }

}

public class DT_POS :PROTOCOLDEFINE
{
    public byte Layer ;
    public uint PosZ ;
    public uint PosX ;
    public uint PosY ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Layer), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Layer = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            PosZ = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PosX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PosY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Layer: " + Layer);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        
    }

}

public class PKT_DT_ACT_REPLY :PROTOCOLDEFINE
{
    public PKT_DT_LOGIN_FAIL Fail  = new PKT_DT_LOGIN_FAIL();
    public PKT_DT_LOGIN_SUCCESS Succ  = new PKT_DT_LOGIN_SUCCESS();
    public PKT_DT_LOGIN_INTERMEDIATE Inter  = new PKT_DT_LOGIN_INTERMEDIATE();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _Fail_temp_capacity = 0;
            byte[] _Fail_temp = Fail.GetSendbuf(ref _Fail_temp_capacity);
            if(_Fail_temp == null)
            {
                return null;
            }
            Array.Copy(_Fail_temp, 0, c, capacity, _Fail_temp_capacity);
            capacity += _Fail_temp_capacity;

            int _Succ_temp_capacity = 0;
            byte[] _Succ_temp = Succ.GetSendbuf(ref _Succ_temp_capacity);
            if(_Succ_temp == null)
            {
                return null;
            }
            Array.Copy(_Succ_temp, 0, c, capacity, _Succ_temp_capacity);
            capacity += _Succ_temp_capacity;

            int _Inter_temp_capacity = 0;
            byte[] _Inter_temp = Inter.GetSendbuf(ref _Inter_temp_capacity);
            if(_Inter_temp == null)
            {
                return null;
            }
            Array.Copy(_Inter_temp, 0, c, capacity, _Inter_temp_capacity);
            capacity += _Inter_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PKT_DT_LOGIN_FAIL _Fail = new PKT_DT_LOGIN_FAIL();
            int _Fail_indent = _Fail.Parse(recvBuf, indent);
            if (_Fail_indent == -1)
            {
                return -1;
            }
            Fail = _Fail;
            indent = _Fail_indent;

            PKT_DT_LOGIN_SUCCESS _Succ = new PKT_DT_LOGIN_SUCCESS();
            int _Succ_indent = _Succ.Parse(recvBuf, indent);
            if (_Succ_indent == -1)
            {
                return -1;
            }
            Succ = _Succ;
            indent = _Succ_indent;

            PKT_DT_LOGIN_INTERMEDIATE _Inter = new PKT_DT_LOGIN_INTERMEDIATE();
            int _Inter_indent = _Inter.Parse(recvBuf, indent);
            if (_Inter_indent == -1)
            {
                return -1;
            }
            Inter = _Inter;
            indent = _Inter_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Fail: ") ;Fail.DebugPrint();
        UnityEngine.Debug.Log("Succ: ") ;Succ.DebugPrint();
        UnityEngine.Debug.Log("Inter: ") ;Inter.DebugPrint();
        
    }

}

public class DT_ITEMINFOPOS :PROTOCOLDEFINE
{
    public DT_ITEMINFO ItemInfo  = new DT_ITEMINFO();
    public ushort Pos ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _ItemInfo_temp_capacity = 0;
            byte[] _ItemInfo_temp = ItemInfo.GetSendbuf(ref _ItemInfo_temp_capacity);
            if(_ItemInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_ItemInfo_temp, 0, c, capacity, _ItemInfo_temp_capacity);
            capacity += _ItemInfo_temp_capacity;

            Array.Copy(BitConverter.GetBytes(Pos), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DT_ITEMINFO _ItemInfo = new DT_ITEMINFO();
            int _ItemInfo_indent = _ItemInfo.Parse(recvBuf, indent);
            if (_ItemInfo_indent == -1)
            {
                return -1;
            }
            ItemInfo = _ItemInfo;
            indent = _ItemInfo_indent;

            Pos = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ItemInfo: ") ;ItemInfo.DebugPrint();
        UnityEngine.Debug.Log("Pos: " + Pos);
        
    }

}

public class CLTDT_SELF_BASEINFO :PROTOCOLDEFINE
{
    public uint HP ;
    public Base3dPosition Postion  = new Base3dPosition();
    public uint MaxMP ;
    public byte Sex ;
    public uint MP ;
    public uint MaxHP ;
    public DT_ATTACKPROP AttackProp  = new DT_ATTACKPROP();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(HP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _Postion_temp_capacity = 0;
            byte[] _Postion_temp = Postion.GetSendbuf(ref _Postion_temp_capacity);
            if(_Postion_temp == null)
            {
                return null;
            }
            Array.Copy(_Postion_temp, 0, c, capacity, _Postion_temp_capacity);
            capacity += _Postion_temp_capacity;

            Array.Copy(BitConverter.GetBytes(MaxMP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Sex), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(MP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(MaxHP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _AttackProp_temp_capacity = 0;
            byte[] _AttackProp_temp = AttackProp.GetSendbuf(ref _AttackProp_temp_capacity);
            if(_AttackProp_temp == null)
            {
                return null;
            }
            Array.Copy(_AttackProp_temp, 0, c, capacity, _AttackProp_temp_capacity);
            capacity += _AttackProp_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            HP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Base3dPosition _Postion = new Base3dPosition();
            int _Postion_indent = _Postion.Parse(recvBuf, indent);
            if (_Postion_indent == -1)
            {
                return -1;
            }
            Postion = _Postion;
            indent = _Postion_indent;

            MaxMP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Sex = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            MP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            MaxHP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            DT_ATTACKPROP _AttackProp = new DT_ATTACKPROP();
            int _AttackProp_indent = _AttackProp.Parse(recvBuf, indent);
            if (_AttackProp_indent == -1)
            {
                return -1;
            }
            AttackProp = _AttackProp;
            indent = _AttackProp_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("HP: " + HP);
        UnityEngine.Debug.Log("Postion: ") ;Postion.DebugPrint();
        UnityEngine.Debug.Log("MaxMP: " + MaxMP);
        UnityEngine.Debug.Log("Sex: " + Sex);
        UnityEngine.Debug.Log("MP: " + MP);
        UnityEngine.Debug.Log("MaxHP: " + MaxHP);
        UnityEngine.Debug.Log("AttackProp: ") ;AttackProp.DebugPrint();
        
    }

}

public class PKT_CLIGS_TASKREWARD_NTF :PROTOCOLDEFINE
{
    public uint TaskMoney ;
    public uint TaskID ;
    public uint TaskExp ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TaskMoney), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TaskID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TaskExp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TaskMoney = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TaskID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TaskExp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskMoney: " + TaskMoney);
        UnityEngine.Debug.Log("TaskID: " + TaskID);
        UnityEngine.Debug.Log("TaskExp: " + TaskExp);
        
    }

}

public class PKT_GTCOM_CLIENT_CLOSE_NTF :PROTOCOLDEFINE
{
    public byte CloseType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(CloseType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            CloseType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("CloseType: " + CloseType);
        
    }

}

public class PKT_GSCLI_NPC_EVENT_NTF :PROTOCOLDEFINE
{
    public uint EventID ;
    public float AimY ;
    public float AimX ;
    public float AimZ ;
    public uint NpcID ;
    public uint TargetID ;
    public uint NpcType ;
    public ushort Dir ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(EventID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AimY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(AimX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(AimZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(NpcID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(NpcType), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            EventID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AimY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            AimX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            AimZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            NpcID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            NpcType = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Dir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("EventID: " + EventID);
        UnityEngine.Debug.Log("AimY: " + AimY);
        UnityEngine.Debug.Log("AimX: " + AimX);
        UnityEngine.Debug.Log("AimZ: " + AimZ);
        UnityEngine.Debug.Log("NpcID: " + NpcID);
        UnityEngine.Debug.Log("TargetID: " + TargetID);
        UnityEngine.Debug.Log("NpcType: " + NpcType);
        UnityEngine.Debug.Log("Dir: " + Dir);
        
    }

}

public class PKT_CLIGS_TASK_INFO :PROTOCOLDEFINE
{
    public byte ElementCount ;
    public byte TaskFinishCount ;
    public byte TaskCurState ;
    public uint TaskID ;
    public CLTDT_CLIGS_ELEMENT_INFO[] ElementInfo  = new CLTDT_CLIGS_ELEMENT_INFO[MAX_TASK_ELEMENT_MAX];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ElementCount), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TaskFinishCount), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TaskCurState), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TaskID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            
            if(ElementCount > MAX_TASK_ELEMENT_MAX)
            {
                return null;
            }

            if(ElementCount > ElementInfo.Length)
            {
                return null;
            }
            for (int i=0; i<ElementCount; ++i)
            {
                
                int _ElementInfo_temp_capacity = 0;
                byte[] _ElementInfo_temp = ElementInfo[i].GetSendbuf(ref _ElementInfo_temp_capacity);
                if(_ElementInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_ElementInfo_temp, 0, c, capacity, _ElementInfo_temp_capacity);
                capacity += _ElementInfo_temp_capacity;

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ElementCount = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TaskFinishCount = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TaskCurState = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TaskID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            
            if(ElementCount > MAX_TASK_ELEMENT_MAX)
            {
                return -1;
            }

            //if(ElementInfo.Length > ElementCount)
            //{
            //    return -1;
            //}
            for (int i=0; i<ElementCount; ++i)
            {
                
                CLTDT_CLIGS_ELEMENT_INFO _ElementInfo = new CLTDT_CLIGS_ELEMENT_INFO();
                int _ElementInfo_indent = _ElementInfo.Parse(recvBuf, indent);
                if (_ElementInfo_indent == -1)
                {
                    return -1;
                }
                ElementInfo[i] = _ElementInfo;
                indent = _ElementInfo_indent;

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ElementCount: " + ElementCount);
        UnityEngine.Debug.Log("TaskFinishCount: " + TaskFinishCount);
        UnityEngine.Debug.Log("TaskCurState: " + TaskCurState);
        UnityEngine.Debug.Log("TaskID: " + TaskID);
        foreach(CLTDT_CLIGS_ELEMENT_INFO o in ElementInfo){UnityEngine.Debug.Log("ElementInfo[]: ") ;o.DebugPrint();}
        
    }

}

public class PKT_CLIGS_NPC_TALK_SUCC :PROTOCOLDEFINE
{
    public string Content  = "" ;
    public byte Count ;
    public uint NpcID ;
    public ushort InfoLen ;
    public CLTDT_CLIGS_TASKINFO[] TaskInfo  = new CLTDT_CLIGS_TASKINFO[MAX_TASK_COUNT_LEN];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (MAX_NPC_TALK_LEN > Content.Length)
            //{
            //    return null;
            //}
            short _Content_length =(short)(Content.Length);
            Array.Copy(BitConverter.GetBytes(_Content_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Content), 0, c, capacity, _Content_length);
            capacity += _Content_length;

            Array.Copy(BitConverter.GetBytes(Count), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(NpcID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(InfoLen), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            
            if(Count > MAX_TASK_COUNT_LEN)
            {
                return null;
            }

            if(Count > TaskInfo.Length)
            {
                return null;
            }
            for (int i=0; i<Count; ++i)
            {
                
                int _TaskInfo_temp_capacity = 0;
                byte[] _TaskInfo_temp = TaskInfo[i].GetSendbuf(ref _TaskInfo_temp_capacity);
                if(_TaskInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_TaskInfo_temp, 0, c, capacity, _TaskInfo_temp_capacity);
                capacity += _TaskInfo_temp_capacity;

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _Content_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Content_length>MAX_NPC_TALK_LEN)
            //{
            //    return -1;
            //}
            Content = Encoding.ASCII.GetString(recvBuf, indent, _Content_length);
            indent += _Content_length;

            Count = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            NpcID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            InfoLen = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            
            if(Count > MAX_TASK_COUNT_LEN)
            {
                return -1;
            }

            //if(TaskInfo.Length > Count)
            //{
            //    return -1;
            //}
            for (int i=0; i<Count; ++i)
            {
                
                CLTDT_CLIGS_TASKINFO _TaskInfo = new CLTDT_CLIGS_TASKINFO();
                int _TaskInfo_indent = _TaskInfo.Parse(recvBuf, indent);
                if (_TaskInfo_indent == -1)
                {
                    return -1;
                }
                TaskInfo[i] = _TaskInfo;
                indent = _TaskInfo_indent;

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Content: " + Content);
        UnityEngine.Debug.Log("Count: " + Count);
        UnityEngine.Debug.Log("NpcID: " + NpcID);
        UnityEngine.Debug.Log("InfoLen: " + InfoLen);
        foreach(CLTDT_CLIGS_TASKINFO o in TaskInfo){UnityEngine.Debug.Log("TaskInfo[]: ") ;o.DebugPrint();}
        
    }

}

public class PKT_CLILS_LOGIN_REQ :PROTOCOLDEFINE
{
    public byte[] Info  = new byte[INFO_LEN];
    public string UserType  = "" ;
    public int InfoLen ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            
            if(InfoLen > INFO_LEN)
            {
                return null;
            }

            if(InfoLen > Info.Length)
            {
                return null;
            }
            for (int i=0; i<InfoLen; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(Info[i]), 0, c, capacity, sizeof(byte));
                capacity += sizeof(byte);

            }

            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            Array.Copy(BitConverter.GetBytes(InfoLen), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            
            if(InfoLen > INFO_LEN)
            {
                return -1;
            }

            //if(Info.Length > InfoLen)
            //{
            //    return -1;
            //}
            for (int i=0; i<InfoLen; ++i)
            {
                
                Info[i] = (byte)BitConverter.ToChar(recvBuf, indent);
                indent += sizeof(byte);

            }

            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            InfoLen = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        foreach(byte o in Info){UnityEngine.Debug.Log("Info[]: " + o);}
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("InfoLen: " + InfoLen);
        
    }

}

public class PKT_CLICOM_LOGOUT_ACK :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class PKT_CLIGS_CREATUREDAMAGE_NTF :PROTOCOLDEFINE
{
    public ushort DamageType ;
    public uint HPLoss ;
    public uint ObjID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DamageType), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(HPLoss), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DamageType = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            HPLoss = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DamageType: " + DamageType);
        UnityEngine.Debug.Log("HPLoss: " + HPLoss);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        
    }

}

public class CLTDT_CLIGS_TASK_REPLAY :PROTOCOLDEFINE
{
    public string TaskCurrentContent  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (MAX_TASK_DES_LEN > TaskCurrentContent.Length)
            //{
            //    return null;
            //}
            short _TaskCurrentContent_length =(short)(TaskCurrentContent.Length);
            Array.Copy(BitConverter.GetBytes(_TaskCurrentContent_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(TaskCurrentContent), 0, c, capacity, _TaskCurrentContent_length);
            capacity += _TaskCurrentContent_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _TaskCurrentContent_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_TaskCurrentContent_length>MAX_TASK_DES_LEN)
            //{
            //    return -1;
            //}
            TaskCurrentContent = Encoding.ASCII.GetString(recvBuf, indent, _TaskCurrentContent_length);
            indent += _TaskCurrentContent_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskCurrentContent: " + TaskCurrentContent);
        
    }

}

public class PKT_CLIGS_NPC_CHECK :PROTOCOLDEFINE
{
    public uint NeedCount ;
    public uint ObjKindId ;
    public uint Killed ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NeedCount), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ObjKindId), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Killed), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NeedCount = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ObjKindId = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Killed = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NeedCount: " + NeedCount);
        UnityEngine.Debug.Log("ObjKindId: " + ObjKindId);
        UnityEngine.Debug.Log("Killed: " + Killed);
        
    }

}

public class PKT_CLIGS_LEAVEGS_ACK :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public int ErrCode ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLIGS_ROLE_DRESS_ACK :PROTOCOLDEFINE
{
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class PKT_CLIGS_SELF_INFO_NTF :PROTOCOLDEFINE
{
    public uint SceneTypeID ;
    public DT_SKILLINFO_SAVE[] RoleSkill  = new DT_SKILLINFO_SAVE[MAX_ROLESKILL_COUNT];
    public byte Level ;
    public byte Career ;
    public byte Face ;
    public byte Hair ;
    public CLTDT_SELF_EQUIPTMENTSINFO EquiptmentsInfo  = new CLTDT_SELF_EQUIPTMENTSINFO();
    public uint ObjID ;
    public byte HairColor ;
    public CLTDT_SELF_BASEINFO BaseInfo  = new CLTDT_SELF_BASEINFO();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(SceneTypeID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            
            if(MAX_ROLESKILL_COUNT > RoleSkill.Length)
            {
                return null;
            }
            for (int i=0; i<MAX_ROLESKILL_COUNT; ++i)
            {
                
                int _RoleSkill_temp_capacity = 0;
                byte[] _RoleSkill_temp = RoleSkill[i].GetSendbuf(ref _RoleSkill_temp_capacity);
                if(_RoleSkill_temp == null)
                {
                    return null;
                }
                Array.Copy(_RoleSkill_temp, 0, c, capacity, _RoleSkill_temp_capacity);
                capacity += _RoleSkill_temp_capacity;

            }

            Array.Copy(BitConverter.GetBytes(Level), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(Career), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(Face), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(Hair), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            int _EquiptmentsInfo_temp_capacity = 0;
            byte[] _EquiptmentsInfo_temp = EquiptmentsInfo.GetSendbuf(ref _EquiptmentsInfo_temp_capacity);
            if(_EquiptmentsInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_EquiptmentsInfo_temp, 0, c, capacity, _EquiptmentsInfo_temp_capacity);
            capacity += _EquiptmentsInfo_temp_capacity;

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(HairColor), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            int _BaseInfo_temp_capacity = 0;
            byte[] _BaseInfo_temp = BaseInfo.GetSendbuf(ref _BaseInfo_temp_capacity);
            if(_BaseInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_BaseInfo_temp, 0, c, capacity, _BaseInfo_temp_capacity);
            capacity += _BaseInfo_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            SceneTypeID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            
            //if(RoleSkill.Length > MAX_ROLESKILL_COUNT)
            //{
            //    return -1;
            //}
            for (int i=0; i<MAX_ROLESKILL_COUNT; ++i)
            {
                
                DT_SKILLINFO_SAVE _RoleSkill = new DT_SKILLINFO_SAVE();
                int _RoleSkill_indent = _RoleSkill.Parse(recvBuf, indent);
                if (_RoleSkill_indent == -1)
                {
                    return -1;
                }
                RoleSkill[i] = _RoleSkill;
                indent = _RoleSkill_indent;

            }

            Level = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            Career = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            Face = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            Hair = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            CLTDT_SELF_EQUIPTMENTSINFO _EquiptmentsInfo = new CLTDT_SELF_EQUIPTMENTSINFO();
            int _EquiptmentsInfo_indent = _EquiptmentsInfo.Parse(recvBuf, indent);
            if (_EquiptmentsInfo_indent == -1)
            {
                return -1;
            }
            EquiptmentsInfo = _EquiptmentsInfo;
            indent = _EquiptmentsInfo_indent;

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            HairColor = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            CLTDT_SELF_BASEINFO _BaseInfo = new CLTDT_SELF_BASEINFO();
            int _BaseInfo_indent = _BaseInfo.Parse(recvBuf, indent);
            if (_BaseInfo_indent == -1)
            {
                return -1;
            }
            BaseInfo = _BaseInfo;
            indent = _BaseInfo_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("SceneTypeID: " + SceneTypeID);
        foreach(DT_SKILLINFO_SAVE o in RoleSkill){UnityEngine.Debug.Log("RoleSkill[]: ") ;o.DebugPrint();}
        UnityEngine.Debug.Log("Level: " + Level);
        UnityEngine.Debug.Log("Career: " + Career);
        UnityEngine.Debug.Log("Face: " + Face);
        UnityEngine.Debug.Log("Hair: " + Hair);
        UnityEngine.Debug.Log("EquiptmentsInfo: ") ;EquiptmentsInfo.DebugPrint();
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        UnityEngine.Debug.Log("HairColor: " + HairColor);
        UnityEngine.Debug.Log("BaseInfo: ") ;BaseInfo.DebugPrint();
        
    }

}

public class PKT_CLIGS_TASKOPERATE_ACK :PROTOCOLDEFINE
{
    public byte TaskCurState ;
    public uint TaskID ;
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TaskCurState), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TaskID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TaskCurState = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TaskID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskCurState: " + TaskCurState);
        UnityEngine.Debug.Log("TaskID: " + TaskID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class DT_SKILLINFO_SAVE :PROTOCOLDEFINE
{
    public byte[] ExtInfo  = new byte[MAX_SKILL_EXT_NUM];
    public uint Exp ;
    public ushort SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            
            if(MAX_SKILL_EXT_NUM > ExtInfo.Length)
            {
                return null;
            }
            for (int i=0; i<MAX_SKILL_EXT_NUM; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(ExtInfo[i]), 0, c, capacity, sizeof(byte));
                capacity += sizeof(byte);

            }

            Array.Copy(BitConverter.GetBytes(Exp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            
            //if(ExtInfo.Length > MAX_SKILL_EXT_NUM)
            //{
            //    return -1;
            //}
            for (int i=0; i<MAX_SKILL_EXT_NUM; ++i)
            {
                
                ExtInfo[i] = (byte)BitConverter.ToChar(recvBuf, indent);
                indent += sizeof(byte);

            }

            Exp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            SkillID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        foreach(byte o in ExtInfo){UnityEngine.Debug.Log("ExtInfo[]: " + o);}
        UnityEngine.Debug.Log("Exp: " + Exp);
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class CLTDT_CLIGS_TASKINFO :PROTOCOLDEFINE
{
    public string TaskName  = "" ;
    public uint TaskID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (MAX_TASK_NAME_LEN > TaskName.Length)
            //{
            //    return null;
            //}
            short _TaskName_length =(short)(TaskName.Length);
            Array.Copy(BitConverter.GetBytes(_TaskName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(TaskName), 0, c, capacity, _TaskName_length);
            capacity += _TaskName_length;

            Array.Copy(BitConverter.GetBytes(TaskID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _TaskName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_TaskName_length>MAX_TASK_NAME_LEN)
            //{
            //    return -1;
            //}
            TaskName = Encoding.ASCII.GetString(recvBuf, indent, _TaskName_length);
            indent += _TaskName_length;

            TaskID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskName: " + TaskName);
        UnityEngine.Debug.Log("TaskID: " + TaskID);
        
    }

}

public class PKT_CLIGS_NPC_TALK_FAIL :PROTOCOLDEFINE
{
    public string FailInfo  = "" ;
    public ushort ErrCode ;
    public ushort InfoLen ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (INFO_LEN > FailInfo.Length)
            //{
            //    return null;
            //}
            short _FailInfo_length =(short)(FailInfo.Length);
            Array.Copy(BitConverter.GetBytes(_FailInfo_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(FailInfo), 0, c, capacity, _FailInfo_length);
            capacity += _FailInfo_length;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(InfoLen), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _FailInfo_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_FailInfo_length>INFO_LEN)
            //{
            //    return -1;
            //}
            FailInfo = Encoding.ASCII.GetString(recvBuf, indent, _FailInfo_length);
            indent += _FailInfo_length;

            ErrCode = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            InfoLen = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("FailInfo: " + FailInfo);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("InfoLen: " + InfoLen);
        
    }

}

public class PKT_CLIDB_SELECTROLE_REQ :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLIGS_TRIGGER_DAMAGE_REQ :PROTOCOLDEFINE
{
    public uint TriggerEntityID ;
    public uint TriggerID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TriggerEntityID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TriggerID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TriggerEntityID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TriggerID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TriggerEntityID: " + TriggerEntityID);
        UnityEngine.Debug.Log("TriggerID: " + TriggerID);
        
    }

}

public class PKT_CLIGS_NPC_TALK_ACK :PROTOCOLDEFINE
{
    public PKT_CLIGS_NPC_TALK_REPLY Reply  = new PKT_CLIGS_NPC_TALK_REPLY();
    public byte AckType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _Reply_temp_capacity = 0;
            byte[] _Reply_temp = Reply.GetSendbuf(ref _Reply_temp_capacity);
            if(_Reply_temp == null)
            {
                return null;
            }
            Array.Copy(_Reply_temp, 0, c, capacity, _Reply_temp_capacity);
            capacity += _Reply_temp_capacity;

            Array.Copy(BitConverter.GetBytes(AckType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PKT_CLIGS_NPC_TALK_REPLY _Reply = new PKT_CLIGS_NPC_TALK_REPLY();
            int _Reply_indent = _Reply.Parse(recvBuf, indent);
            if (_Reply_indent == -1)
            {
                return -1;
            }
            Reply = _Reply;
            indent = _Reply_indent;

            AckType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Reply: ") ;Reply.DebugPrint();
        UnityEngine.Debug.Log("AckType: " + AckType);
        
    }

}

public class CLTDT_LISTROLEINFO :PROTOCOLDEFINE
{
    public byte Layer ;
    public byte Level ;
    public byte Career ;
    public ulong RoleID ;
    public byte Sex ;
    public string SceneID  = "" ;
    public CLTDT_AVATAR_INFO AvatarInfo  = new CLTDT_AVATAR_INFO();
    public uint PosZ ;
    public uint PosX ;
    public uint PosY ;
    public string RoleName  = "" ;
    public ushort Dir ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Layer), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(Level), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(Career), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(RoleID), 0, c, capacity, sizeof(ulong));
            capacity += sizeof(ulong);

            Array.Copy(BitConverter.GetBytes(Sex), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            //if (MAX_SCENEID_LEN > SceneID.Length)
            //{
            //    return null;
            //}
            short _SceneID_length =(short)(SceneID.Length);
            Array.Copy(BitConverter.GetBytes(_SceneID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(SceneID), 0, c, capacity, _SceneID_length);
            capacity += _SceneID_length;

            int _AvatarInfo_temp_capacity = 0;
            byte[] _AvatarInfo_temp = AvatarInfo.GetSendbuf(ref _AvatarInfo_temp_capacity);
            if(_AvatarInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_AvatarInfo_temp, 0, c, capacity, _AvatarInfo_temp_capacity);
            capacity += _AvatarInfo_temp_capacity;

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Layer = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            Level = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            Career = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            RoleID = BitConverter.ToUInt64(recvBuf, indent);
            indent += sizeof(ulong);

            Sex = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            short _SceneID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_SceneID_length>MAX_SCENEID_LEN)
            //{
            //    return -1;
            //}
            SceneID = Encoding.ASCII.GetString(recvBuf, indent, _SceneID_length);
            indent += _SceneID_length;

            CLTDT_AVATAR_INFO _AvatarInfo = new CLTDT_AVATAR_INFO();
            int _AvatarInfo_indent = _AvatarInfo.Parse(recvBuf, indent);
            if (_AvatarInfo_indent == -1)
            {
                return -1;
            }
            AvatarInfo = _AvatarInfo;
            indent = _AvatarInfo_indent;

            PosZ = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PosX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PosY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            Dir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Layer: " + Layer);
        UnityEngine.Debug.Log("Level: " + Level);
        UnityEngine.Debug.Log("Career: " + Career);
        UnityEngine.Debug.Log("RoleID: " + RoleID);
        UnityEngine.Debug.Log("Sex: " + Sex);
        UnityEngine.Debug.Log("SceneID: " + SceneID);
        UnityEngine.Debug.Log("AvatarInfo: ") ;AvatarInfo.DebugPrint();
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        UnityEngine.Debug.Log("Dir: " + Dir);
        
    }

}

public class PKT_CLIGS_ROLE_VELOCITY_REQ :PROTOCOLDEFINE
{
    public float DirZ ;
    public float DirY ;
    public float DirX ;
    public float PosZ ;
    public float PosX ;
    public float PosY ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DirZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DirZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DirZ: " + DirZ);
        UnityEngine.Debug.Log("DirY: " + DirY);
        UnityEngine.Debug.Log("DirX: " + DirX);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        
    }

}

public class PKT_GSCLI_SKILL_DAMAGE_NTF :PROTOCOLDEFINE
{
    public uint DamageValue ;
    public uint CasterID ;
    public uint TargetID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DamageValue), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(CasterID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DamageValue = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            CasterID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DamageValue: " + DamageValue);
        UnityEngine.Debug.Log("CasterID: " + CasterID);
        UnityEngine.Debug.Log("TargetID: " + TargetID);
        
    }

}

public class PKT_CLIGS_PACKGECHANGE_NTF :PROTOCOLDEFINE
{
    public ushort ItemsNum ;
    public byte Type ;
    public DT_ITEMINFOPOS[] ItemsInfo  = new DT_ITEMINFOPOS[MAX_BODYPACKAGE_COUNT];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ItemsNum), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(Type), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            
            if(ItemsNum > MAX_BODYPACKAGE_COUNT)
            {
                return null;
            }

            if(ItemsNum > ItemsInfo.Length)
            {
                return null;
            }
            for (int i=0; i<ItemsNum; ++i)
            {
                
                int _ItemsInfo_temp_capacity = 0;
                byte[] _ItemsInfo_temp = ItemsInfo[i].GetSendbuf(ref _ItemsInfo_temp_capacity);
                if(_ItemsInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_ItemsInfo_temp, 0, c, capacity, _ItemsInfo_temp_capacity);
                capacity += _ItemsInfo_temp_capacity;

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ItemsNum = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            Type = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            
            if(ItemsNum > MAX_BODYPACKAGE_COUNT)
            {
                return -1;
            }

            //if(ItemsInfo.Length > ItemsNum)
            //{
            //    return -1;
            //}
            for (int i=0; i<ItemsNum; ++i)
            {
                
                DT_ITEMINFOPOS _ItemsInfo = new DT_ITEMINFOPOS();
                int _ItemsInfo_indent = _ItemsInfo.Parse(recvBuf, indent);
                if (_ItemsInfo_indent == -1)
                {
                    return -1;
                }
                ItemsInfo[i] = _ItemsInfo;
                indent = _ItemsInfo_indent;

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ItemsNum: " + ItemsNum);
        UnityEngine.Debug.Log("Type: " + Type);
        foreach(DT_ITEMINFOPOS o in ItemsInfo){UnityEngine.Debug.Log("ItemsInfo[]: ") ;o.DebugPrint();}
        
    }

}

public class PKT_CLIGS_NPCITEMSUBLST_REQ :PROTOCOLDEFINE
{
    public ushort IndexBegin ;
    public uint ItemKindID ;
    public uint NpcObjID ;
    public ushort IndexEnd ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(IndexBegin), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(ItemKindID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(NpcObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(IndexEnd), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            IndexBegin = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            ItemKindID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            NpcObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            IndexEnd = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("IndexBegin: " + IndexBegin);
        UnityEngine.Debug.Log("ItemKindID: " + ItemKindID);
        UnityEngine.Debug.Log("NpcObjID: " + NpcObjID);
        UnityEngine.Debug.Log("IndexEnd: " + IndexEnd);
        
    }

}

public class PKT_CLIGS_SKILL_ATTACK_ACK :PROTOCOLDEFINE
{
    public uint Target ;
    public uint AimY ;
    public uint AimX ;
    public int ErrCode ;
    public ushort AimDir ;
    public byte PrepareState ;
    public ushort SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Target), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AimY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AimX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(AimDir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(PrepareState), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Target = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AimY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AimX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            AimDir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            PrepareState = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            SkillID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Target: " + Target);
        UnityEngine.Debug.Log("AimY: " + AimY);
        UnityEngine.Debug.Log("AimX: " + AimX);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("AimDir: " + AimDir);
        UnityEngine.Debug.Log("PrepareState: " + PrepareState);
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class PKT_CLIGS_CREATUREDIE_NTF :PROTOCOLDEFINE
{
    public byte Layer ;
    public uint PosZ ;
    public uint ObjID ;
    public uint PosX ;
    public uint PosY ;
    public ushort Dir ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Layer), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Layer = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            PosZ = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PosX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PosY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Dir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Layer: " + Layer);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        UnityEngine.Debug.Log("Dir: " + Dir);
        
    }

}

public class PKT_CLICOM_SHUTDOWNCLI_NTF :PROTOCOLDEFINE
{
    public int ExitType ;
    public string UserType  = "" ;
    public string UserID  = "" ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ExitType), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ExitType = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ExitType: " + ExitType);
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLIGS_TASKBAG_NTF :PROTOCOLDEFINE
{
    public byte Count ;
    public byte ChangeType ;
    public PKT_CLIGS_TASK_INFO[] TaskInfo  = new PKT_CLIGS_TASK_INFO[MAX_TASK_COUNT_LEN];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Count), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(ChangeType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            
            if(Count > MAX_TASK_COUNT_LEN)
            {
                return null;
            }

            if(Count > TaskInfo.Length)
            {
                return null;
            }
            for (int i=0; i<Count; ++i)
            {
                
                int _TaskInfo_temp_capacity = 0;
                byte[] _TaskInfo_temp = TaskInfo[i].GetSendbuf(ref _TaskInfo_temp_capacity);
                if(_TaskInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_TaskInfo_temp, 0, c, capacity, _TaskInfo_temp_capacity);
                capacity += _TaskInfo_temp_capacity;

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Count = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            ChangeType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            
            if(Count > MAX_TASK_COUNT_LEN)
            {
                return -1;
            }

            //if(TaskInfo.Length > Count)
            //{
            //    return -1;
            //}
            for (int i=0; i<Count; ++i)
            {
                
                PKT_CLIGS_TASK_INFO _TaskInfo = new PKT_CLIGS_TASK_INFO();
                int _TaskInfo_indent = _TaskInfo.Parse(recvBuf, indent);
                if (_TaskInfo_indent == -1)
                {
                    return -1;
                }
                TaskInfo[i] = _TaskInfo;
                indent = _TaskInfo_indent;

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Count: " + Count);
        UnityEngine.Debug.Log("ChangeType: " + ChangeType);
        foreach(PKT_CLIGS_TASK_INFO o in TaskInfo){UnityEngine.Debug.Log("TaskInfo[]: ") ;o.DebugPrint();}
        
    }

}

public class PKT_CLIGS_TASKDETAIL_REQ :PROTOCOLDEFINE
{
    public uint NpcID ;
    public uint TaskID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NpcID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TaskID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NpcID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TaskID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NpcID: " + NpcID);
        UnityEngine.Debug.Log("TaskID: " + TaskID);
        
    }

}

public class PKT_CLIGS_SKILL_EFFECT_REQ :PROTOCOLDEFINE
{
    public float DirZ ;
    public float DirY ;
    public float DirX ;
    public float PosZ ;
    public float PosX ;
    public float PosY ;
    public string EffectName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DirZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            //if (128 > EffectName.Length)
            //{
            //    return null;
            //}
            short _EffectName_length =(short)(EffectName.Length);
            Array.Copy(BitConverter.GetBytes(_EffectName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(EffectName), 0, c, capacity, _EffectName_length);
            capacity += _EffectName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DirZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            short _EffectName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_EffectName_length>128)
            //{
            //    return -1;
            //}
            EffectName = Encoding.ASCII.GetString(recvBuf, indent, _EffectName_length);
            indent += _EffectName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DirZ: " + DirZ);
        UnityEngine.Debug.Log("DirY: " + DirY);
        UnityEngine.Debug.Log("DirX: " + DirX);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        UnityEngine.Debug.Log("EffectName: " + EffectName);
        
    }

}

public class CSHARP_MSGHEADER :PROTOCOLDEFINE
{
    public ushort msgID ;
    public uint msgLength ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(msgID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(msgLength), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            msgID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            msgLength = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("msgID: " + msgID);
        UnityEngine.Debug.Log("msgLength: " + msgLength);
        
    }

}

public class PKT_CLIGS_ITEMSMITHING_ACK :PROTOCOLDEFINE
{
    public DT_ITEMINFO ItemInfo  = new DT_ITEMINFO();
    public uint ItemObjID ;
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _ItemInfo_temp_capacity = 0;
            byte[] _ItemInfo_temp = ItemInfo.GetSendbuf(ref _ItemInfo_temp_capacity);
            if(_ItemInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_ItemInfo_temp, 0, c, capacity, _ItemInfo_temp_capacity);
            capacity += _ItemInfo_temp_capacity;

            Array.Copy(BitConverter.GetBytes(ItemObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DT_ITEMINFO _ItemInfo = new DT_ITEMINFO();
            int _ItemInfo_indent = _ItemInfo.Parse(recvBuf, indent);
            if (_ItemInfo_indent == -1)
            {
                return -1;
            }
            ItemInfo = _ItemInfo;
            indent = _ItemInfo_indent;

            ItemObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ItemInfo: ") ;ItemInfo.DebugPrint();
        UnityEngine.Debug.Log("ItemObjID: " + ItemObjID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class PKT_CLIGS_SKILL_ATTACK_NTF :PROTOCOLDEFINE
{
    public uint AimY ;
    public uint AimX ;
    public uint TargetID ;
    public ushort AimDir ;
    public byte PrepareState ;
    public uint CharacterID ;
    public ushort SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(AimY), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AimX), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(AimDir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(PrepareState), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(CharacterID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            AimY = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AimX = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            AimDir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            PrepareState = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            CharacterID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            SkillID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("AimY: " + AimY);
        UnityEngine.Debug.Log("AimX: " + AimX);
        UnityEngine.Debug.Log("TargetID: " + TargetID);
        UnityEngine.Debug.Log("AimDir: " + AimDir);
        UnityEngine.Debug.Log("PrepareState: " + PrepareState);
        UnityEngine.Debug.Log("CharacterID: " + CharacterID);
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class PKT_CLICT_QUEUEFIN_NTF :PROTOCOLDEFINE
{
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class PKT_CLIGS_TALK_CHECK :PROTOCOLDEFINE
{
    public uint bTalk ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(bTalk), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            bTalk = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("bTalk: " + bTalk);
        
    }

}

public class PKT_CLIGS_NPC_TALK_OVER_NTF :PROTOCOLDEFINE
{
    public uint NpcID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NpcID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NpcID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NpcID: " + NpcID);
        
    }

}

public class PKT_CLIDB_VALID_ROLELIST_REQ :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        
    }

}

public class PKT_CLIGS_ROLE_ACTION_REQ :PROTOCOLDEFINE
{
    public ushort ActionID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ActionID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ActionID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ActionID: " + ActionID);
        
    }

}

public class PKT_GSCLI_ROLE_DATA_UPDATE_NTF :PROTOCOLDEFINE
{
    public ulong RoleObjID ;
    public ushort RoleInfoLen ;
    public byte[] RoleInfo  = new byte[MAX_ROLE_INFO_LEN];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(RoleObjID), 0, c, capacity, sizeof(ulong));
            capacity += sizeof(ulong);

            Array.Copy(BitConverter.GetBytes(RoleInfoLen), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            
            if(RoleInfoLen > MAX_ROLE_INFO_LEN)
            {
                return null;
            }

            if(RoleInfoLen > RoleInfo.Length)
            {
                return null;
            }
            for (int i=0; i<RoleInfoLen; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(RoleInfo[i]), 0, c, capacity, sizeof(byte));
                capacity += sizeof(byte);

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            RoleObjID = BitConverter.ToUInt64(recvBuf, indent);
            indent += sizeof(ulong);

            RoleInfoLen = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            
            if(RoleInfoLen > MAX_ROLE_INFO_LEN)
            {
                return -1;
            }

            //if(RoleInfo.Length > RoleInfoLen)
            //{
            //    return -1;
            //}
            for (int i=0; i<RoleInfoLen; ++i)
            {
                
                RoleInfo[i] = (byte)BitConverter.ToChar(recvBuf, indent);
                indent += sizeof(byte);

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("RoleObjID: " + RoleObjID);
        UnityEngine.Debug.Log("RoleInfoLen: " + RoleInfoLen);
        foreach(byte o in RoleInfo){UnityEngine.Debug.Log("RoleInfo[]: " + o);}
        
    }

}

public class PKT_CLIGS_SYNCTIME_REQ :PROTOCOLDEFINE
{
    public uint ClientTickCnt ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ClientTickCnt), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ClientTickCnt = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ClientTickCnt: " + ClientTickCnt);
        
    }

}

public class PKT_CLIGS_ROLE_CHANGEDIR_ACK :PROTOCOLDEFINE
{
    public uint TimeStamp ;
    public int ErrCode ;
    public float Dir ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TimeStamp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TimeStamp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            Dir = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TimeStamp: " + TimeStamp);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("Dir: " + Dir);
        
    }

}

public class PKT_GSCLI_TRIGGER_ACTION_ACK :PROTOCOLDEFINE
{
    public uint TriggerEntityID ;
    public uint TriggerRole ;
    public uint Para1 ;
    public string Para3  = "" ;
    public uint Para2 ;
    public uint TriggerID ;
    public string Para4  = "" ;
    public uint TriggerActionID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TriggerEntityID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TriggerRole), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Para1), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (32 > Para3.Length)
            //{
            //    return null;
            //}
            short _Para3_length =(short)(Para3.Length);
            Array.Copy(BitConverter.GetBytes(_Para3_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Para3), 0, c, capacity, _Para3_length);
            capacity += _Para3_length;

            Array.Copy(BitConverter.GetBytes(Para2), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TriggerID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (32 > Para4.Length)
            //{
            //    return null;
            //}
            short _Para4_length =(short)(Para4.Length);
            Array.Copy(BitConverter.GetBytes(_Para4_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Para4), 0, c, capacity, _Para4_length);
            capacity += _Para4_length;

            Array.Copy(BitConverter.GetBytes(TriggerActionID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TriggerEntityID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TriggerRole = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Para1 = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _Para3_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Para3_length>32)
            //{
            //    return -1;
            //}
            Para3 = Encoding.ASCII.GetString(recvBuf, indent, _Para3_length);
            indent += _Para3_length;

            Para2 = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TriggerID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _Para4_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Para4_length>32)
            //{
            //    return -1;
            //}
            Para4 = Encoding.ASCII.GetString(recvBuf, indent, _Para4_length);
            indent += _Para4_length;

            TriggerActionID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TriggerEntityID: " + TriggerEntityID);
        UnityEngine.Debug.Log("TriggerRole: " + TriggerRole);
        UnityEngine.Debug.Log("Para1: " + Para1);
        UnityEngine.Debug.Log("Para3: " + Para3);
        UnityEngine.Debug.Log("Para2: " + Para2);
        UnityEngine.Debug.Log("TriggerID: " + TriggerID);
        UnityEngine.Debug.Log("Para4: " + Para4);
        UnityEngine.Debug.Log("TriggerActionID: " + TriggerActionID);
        
    }

}

public class PKT_DT_LOGIN_SUCCESS :PROTOCOLDEFINE
{
    public byte Queue ;
    public string UserType  = "" ;
    public string UserID  = "" ;
    public string DigitID  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Queue), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (DIGITID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            //if (DIGITID_LEN > DigitID.Length)
            //{
            //    return null;
            //}
            short _DigitID_length =(short)(DigitID.Length);
            Array.Copy(BitConverter.GetBytes(_DigitID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(DigitID), 0, c, capacity, _DigitID_length);
            capacity += _DigitID_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Queue = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>DIGITID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            short _DigitID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_DigitID_length>DIGITID_LEN)
            //{
            //    return -1;
            //}
            DigitID = Encoding.ASCII.GetString(recvBuf, indent, _DigitID_length);
            indent += _DigitID_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Queue: " + Queue);
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("DigitID: " + DigitID);
        
    }

}

public class PKT_CLIGS_ROLE_CHAT_NTF :PROTOCOLDEFINE
{
    public uint RoleID ;
    public byte ChatType ;
    public string Context  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(RoleID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ChatType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            //if (MAX_NPC_TALK_LEN > Context.Length)
            //{
            //    return null;
            //}
            short _Context_length =(short)(Context.Length);
            Array.Copy(BitConverter.GetBytes(_Context_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Context), 0, c, capacity, _Context_length);
            capacity += _Context_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            RoleID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ChatType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            short _Context_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Context_length>MAX_NPC_TALK_LEN)
            //{
            //    return -1;
            //}
            Context = Encoding.ASCII.GetString(recvBuf, indent, _Context_length);
            indent += _Context_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("RoleID: " + RoleID);
        UnityEngine.Debug.Log("ChatType: " + ChatType);
        UnityEngine.Debug.Log("Context: " + Context);
        
    }

}

public class PKT_CLIGS_LOADFINISH_RPT :PROTOCOLDEFINE
{
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class PKT_CLIGS_INSTANCE_CHECK :PROTOCOLDEFINE
{
    public string InstanceID  = "" ;
    public uint CaptainNum ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (MAX_TASK_DES_LEN > InstanceID.Length)
            //{
            //    return null;
            //}
            short _InstanceID_length =(short)(InstanceID.Length);
            Array.Copy(BitConverter.GetBytes(_InstanceID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(InstanceID), 0, c, capacity, _InstanceID_length);
            capacity += _InstanceID_length;

            Array.Copy(BitConverter.GetBytes(CaptainNum), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _InstanceID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_InstanceID_length>MAX_TASK_DES_LEN)
            //{
            //    return -1;
            //}
            InstanceID = Encoding.ASCII.GetString(recvBuf, indent, _InstanceID_length);
            indent += _InstanceID_length;

            CaptainNum = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("InstanceID: " + InstanceID);
        UnityEngine.Debug.Log("CaptainNum: " + CaptainNum);
        
    }

}

public class PKT_GSCLI_BEATTACK_EVENT_NTF :PROTOCOLDEFINE
{
    public float Vh ;
    public uint TargetID ;
    public float T0 ;
    public float V0 ;
    public ushort Dir ;
    public ushort BeAttackType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Vh), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(TargetID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(T0), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(V0), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(BeAttackType), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Vh = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            TargetID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            T0 = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            V0 = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            Dir = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            BeAttackType = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Vh: " + Vh);
        UnityEngine.Debug.Log("TargetID: " + TargetID);
        UnityEngine.Debug.Log("T0: " + T0);
        UnityEngine.Debug.Log("V0: " + V0);
        UnityEngine.Debug.Log("Dir: " + Dir);
        UnityEngine.Debug.Log("BeAttackType: " + BeAttackType);
        
    }

}

public class CLTDT_CLIGS_ELEMENT_INFO :PROTOCOLDEFINE
{
    public byte CheckType ;
    public PKT_CLIGS_TASK_CHECK CheckInfo  = new PKT_CLIGS_TASK_CHECK();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(CheckType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            int _CheckInfo_temp_capacity = 0;
            byte[] _CheckInfo_temp = CheckInfo.GetSendbuf(ref _CheckInfo_temp_capacity);
            if(_CheckInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_CheckInfo_temp, 0, c, capacity, _CheckInfo_temp_capacity);
            capacity += _CheckInfo_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            CheckType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            PKT_CLIGS_TASK_CHECK _CheckInfo = new PKT_CLIGS_TASK_CHECK();
            int _CheckInfo_indent = _CheckInfo.Parse(recvBuf, indent);
            if (_CheckInfo_indent == -1)
            {
                return -1;
            }
            CheckInfo = _CheckInfo;
            indent = _CheckInfo_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("CheckType: " + CheckType);
        UnityEngine.Debug.Log("CheckInfo: ") ;CheckInfo.DebugPrint();
        
    }

}

public class PKT_CLIGS_SYNROLEPROP_NTF :PROTOCOLDEFINE
{
    public uint HP ;
    public uint MP ;
    public DT_ATTACKPROP AttackProp  = new DT_ATTACKPROP();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(HP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(MP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _AttackProp_temp_capacity = 0;
            byte[] _AttackProp_temp = AttackProp.GetSendbuf(ref _AttackProp_temp_capacity);
            if(_AttackProp_temp == null)
            {
                return null;
            }
            Array.Copy(_AttackProp_temp, 0, c, capacity, _AttackProp_temp_capacity);
            capacity += _AttackProp_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            HP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            MP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            DT_ATTACKPROP _AttackProp = new DT_ATTACKPROP();
            int _AttackProp_indent = _AttackProp.Parse(recvBuf, indent);
            if (_AttackProp_indent == -1)
            {
                return -1;
            }
            AttackProp = _AttackProp;
            indent = _AttackProp_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("HP: " + HP);
        UnityEngine.Debug.Log("MP: " + MP);
        UnityEngine.Debug.Log("AttackProp: ") ;AttackProp.DebugPrint();
        
    }

}

public class PKT_CLIGS_TASK_CHECK :PROTOCOLDEFINE
{
    public PKT_CLIGS_NPC_CHECK TaskNpc  = new PKT_CLIGS_NPC_CHECK();
    public PKT_CLIGS_ITEM_CHECK TaskItem  = new PKT_CLIGS_ITEM_CHECK();
    public PKT_CLIGS_ARRIVE_CHECK TaskArrive  = new PKT_CLIGS_ARRIVE_CHECK();
    public PKT_CLIGS_TIME_CHECK TaskTime  = new PKT_CLIGS_TIME_CHECK();
    public PKT_CLIGS_LEVEL_CHECK TaskLevel  = new PKT_CLIGS_LEVEL_CHECK();
    public PKT_CLIGS_TALK_CHECK TaskTalk  = new PKT_CLIGS_TALK_CHECK();
    public PKT_CLIGS_INSTANCE_CHECK TaskInstance  = new PKT_CLIGS_INSTANCE_CHECK();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _TaskNpc_temp_capacity = 0;
            byte[] _TaskNpc_temp = TaskNpc.GetSendbuf(ref _TaskNpc_temp_capacity);
            if(_TaskNpc_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskNpc_temp, 0, c, capacity, _TaskNpc_temp_capacity);
            capacity += _TaskNpc_temp_capacity;

            int _TaskItem_temp_capacity = 0;
            byte[] _TaskItem_temp = TaskItem.GetSendbuf(ref _TaskItem_temp_capacity);
            if(_TaskItem_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskItem_temp, 0, c, capacity, _TaskItem_temp_capacity);
            capacity += _TaskItem_temp_capacity;

            int _TaskArrive_temp_capacity = 0;
            byte[] _TaskArrive_temp = TaskArrive.GetSendbuf(ref _TaskArrive_temp_capacity);
            if(_TaskArrive_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskArrive_temp, 0, c, capacity, _TaskArrive_temp_capacity);
            capacity += _TaskArrive_temp_capacity;

            int _TaskTime_temp_capacity = 0;
            byte[] _TaskTime_temp = TaskTime.GetSendbuf(ref _TaskTime_temp_capacity);
            if(_TaskTime_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskTime_temp, 0, c, capacity, _TaskTime_temp_capacity);
            capacity += _TaskTime_temp_capacity;

            int _TaskLevel_temp_capacity = 0;
            byte[] _TaskLevel_temp = TaskLevel.GetSendbuf(ref _TaskLevel_temp_capacity);
            if(_TaskLevel_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskLevel_temp, 0, c, capacity, _TaskLevel_temp_capacity);
            capacity += _TaskLevel_temp_capacity;

            int _TaskTalk_temp_capacity = 0;
            byte[] _TaskTalk_temp = TaskTalk.GetSendbuf(ref _TaskTalk_temp_capacity);
            if(_TaskTalk_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskTalk_temp, 0, c, capacity, _TaskTalk_temp_capacity);
            capacity += _TaskTalk_temp_capacity;

            int _TaskInstance_temp_capacity = 0;
            byte[] _TaskInstance_temp = TaskInstance.GetSendbuf(ref _TaskInstance_temp_capacity);
            if(_TaskInstance_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskInstance_temp, 0, c, capacity, _TaskInstance_temp_capacity);
            capacity += _TaskInstance_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PKT_CLIGS_NPC_CHECK _TaskNpc = new PKT_CLIGS_NPC_CHECK();
            int _TaskNpc_indent = _TaskNpc.Parse(recvBuf, indent);
            if (_TaskNpc_indent == -1)
            {
                return -1;
            }
            TaskNpc = _TaskNpc;
            indent = _TaskNpc_indent;

            PKT_CLIGS_ITEM_CHECK _TaskItem = new PKT_CLIGS_ITEM_CHECK();
            int _TaskItem_indent = _TaskItem.Parse(recvBuf, indent);
            if (_TaskItem_indent == -1)
            {
                return -1;
            }
            TaskItem = _TaskItem;
            indent = _TaskItem_indent;

            PKT_CLIGS_ARRIVE_CHECK _TaskArrive = new PKT_CLIGS_ARRIVE_CHECK();
            int _TaskArrive_indent = _TaskArrive.Parse(recvBuf, indent);
            if (_TaskArrive_indent == -1)
            {
                return -1;
            }
            TaskArrive = _TaskArrive;
            indent = _TaskArrive_indent;

            PKT_CLIGS_TIME_CHECK _TaskTime = new PKT_CLIGS_TIME_CHECK();
            int _TaskTime_indent = _TaskTime.Parse(recvBuf, indent);
            if (_TaskTime_indent == -1)
            {
                return -1;
            }
            TaskTime = _TaskTime;
            indent = _TaskTime_indent;

            PKT_CLIGS_LEVEL_CHECK _TaskLevel = new PKT_CLIGS_LEVEL_CHECK();
            int _TaskLevel_indent = _TaskLevel.Parse(recvBuf, indent);
            if (_TaskLevel_indent == -1)
            {
                return -1;
            }
            TaskLevel = _TaskLevel;
            indent = _TaskLevel_indent;

            PKT_CLIGS_TALK_CHECK _TaskTalk = new PKT_CLIGS_TALK_CHECK();
            int _TaskTalk_indent = _TaskTalk.Parse(recvBuf, indent);
            if (_TaskTalk_indent == -1)
            {
                return -1;
            }
            TaskTalk = _TaskTalk;
            indent = _TaskTalk_indent;

            PKT_CLIGS_INSTANCE_CHECK _TaskInstance = new PKT_CLIGS_INSTANCE_CHECK();
            int _TaskInstance_indent = _TaskInstance.Parse(recvBuf, indent);
            if (_TaskInstance_indent == -1)
            {
                return -1;
            }
            TaskInstance = _TaskInstance;
            indent = _TaskInstance_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskNpc: ") ;TaskNpc.DebugPrint();
        UnityEngine.Debug.Log("TaskItem: ") ;TaskItem.DebugPrint();
        UnityEngine.Debug.Log("TaskArrive: ") ;TaskArrive.DebugPrint();
        UnityEngine.Debug.Log("TaskTime: ") ;TaskTime.DebugPrint();
        UnityEngine.Debug.Log("TaskLevel: ") ;TaskLevel.DebugPrint();
        UnityEngine.Debug.Log("TaskTalk: ") ;TaskTalk.DebugPrint();
        UnityEngine.Debug.Log("TaskInstance: ") ;TaskInstance.DebugPrint();
        
    }

}

public class FUBEN_MAINSCENE_CHESS_INFO :PROTOCOLDEFINE
{
    public ushort Index ;
    public uint NpcType ;
    public uint ObjID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Index), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(NpcType), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Index = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            NpcType = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Index: " + Index);
        UnityEngine.Debug.Log("NpcType: " + NpcType);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        
    }

}

public class PKT_CLIGS_TASKOPERATE_REQ :PROTOCOLDEFINE
{
    public uint NpcID ;
    public byte TaskOperate ;
    public uint TaskID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NpcID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TaskOperate), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TaskID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NpcID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TaskOperate = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TaskID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NpcID: " + NpcID);
        UnityEngine.Debug.Log("TaskOperate: " + TaskOperate);
        UnityEngine.Debug.Log("TaskID: " + TaskID);
        
    }

}

public class PKT_CLIGS_NPCITEMKINDLST_NTF :PROTOCOLDEFINE
{
    public ushort ItemKindNum ;
    public uint NpcObjID ;
    public DT_ITEMKINDINFO[] ItemKindInfo  = new DT_ITEMKINDINFO[MAX_NPCITEMKIND_NUM];

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ItemKindNum), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(NpcObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            
            if(ItemKindNum > MAX_NPCITEMKIND_NUM)
            {
                return null;
            }

            if(ItemKindNum > ItemKindInfo.Length)
            {
                return null;
            }
            for (int i=0; i<ItemKindNum; ++i)
            {
                
                int _ItemKindInfo_temp_capacity = 0;
                byte[] _ItemKindInfo_temp = ItemKindInfo[i].GetSendbuf(ref _ItemKindInfo_temp_capacity);
                if(_ItemKindInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_ItemKindInfo_temp, 0, c, capacity, _ItemKindInfo_temp_capacity);
                capacity += _ItemKindInfo_temp_capacity;

            }

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ItemKindNum = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            NpcObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            
            if(ItemKindNum > MAX_NPCITEMKIND_NUM)
            {
                return -1;
            }

            //if(ItemKindInfo.Length > ItemKindNum)
            //{
            //    return -1;
            //}
            for (int i=0; i<ItemKindNum; ++i)
            {
                
                DT_ITEMKINDINFO _ItemKindInfo = new DT_ITEMKINDINFO();
                int _ItemKindInfo_indent = _ItemKindInfo.Parse(recvBuf, indent);
                if (_ItemKindInfo_indent == -1)
                {
                    return -1;
                }
                ItemKindInfo[i] = _ItemKindInfo;
                indent = _ItemKindInfo_indent;

            }

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ItemKindNum: " + ItemKindNum);
        UnityEngine.Debug.Log("NpcObjID: " + NpcObjID);
        foreach(DT_ITEMKINDINFO o in ItemKindInfo){UnityEngine.Debug.Log("ItemKindInfo[]: ") ;o.DebugPrint();}
        
    }

}

public class PKT_GSCLI_SKILL_EFFECT_NTF :PROTOCOLDEFINE
{
    public float DirZ ;
    public float DirY ;
    public float DirX ;
    public float PosZ ;
    public float PosX ;
    public float PosY ;
    public string EffectName  = "" ;
    public uint CasterID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DirZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            //if (128 > EffectName.Length)
            //{
            //    return null;
            //}
            short _EffectName_length =(short)(EffectName.Length);
            Array.Copy(BitConverter.GetBytes(_EffectName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(EffectName), 0, c, capacity, _EffectName_length);
            capacity += _EffectName_length;

            Array.Copy(BitConverter.GetBytes(CasterID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DirZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            short _EffectName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_EffectName_length>128)
            //{
            //    return -1;
            //}
            EffectName = Encoding.ASCII.GetString(recvBuf, indent, _EffectName_length);
            indent += _EffectName_length;

            CasterID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DirZ: " + DirZ);
        UnityEngine.Debug.Log("DirY: " + DirY);
        UnityEngine.Debug.Log("DirX: " + DirX);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        UnityEngine.Debug.Log("EffectName: " + EffectName);
        UnityEngine.Debug.Log("CasterID: " + CasterID);
        
    }

}

public class PKT_CLIGS_TRIGGER_ACTION_REQ :PROTOCOLDEFINE
{
    public uint TriggerEntityID ;
    public uint TriggerID ;
    public uint TriggerActionID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TriggerEntityID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TriggerID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TriggerActionID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TriggerEntityID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TriggerID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TriggerActionID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TriggerEntityID: " + TriggerEntityID);
        UnityEngine.Debug.Log("TriggerID: " + TriggerID);
        UnityEngine.Debug.Log("TriggerActionID: " + TriggerActionID);
        
    }

}

public class DT_SVRINFO :PROTOCOLDEFINE
{
    public byte ServerStatus ;
    public ushort ListenPort ;
    public uint ListenIP ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ServerStatus), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(ListenPort), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(ListenIP), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ServerStatus = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            ListenPort = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            ListenIP = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ServerStatus: " + ServerStatus);
        UnityEngine.Debug.Log("ListenPort: " + ListenPort);
        UnityEngine.Debug.Log("ListenIP: " + ListenIP);
        
    }

}

public class PKT_CLIGS_OBJ_DISAPPEAR_NTF :PROTOCOLDEFINE
{
    public byte DisappearType ;
    public uint ObjID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DisappearType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DisappearType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DisappearType: " + DisappearType);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        
    }

}

public class PKT_CLIGS_ROLE_CHANGEDIR_REQ :PROTOCOLDEFINE
{
    public uint TimeStamp ;
    public float Dir ;
    public byte RotateType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TimeStamp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Dir), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(RotateType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TimeStamp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Dir = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            RotateType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TimeStamp: " + TimeStamp);
        UnityEngine.Debug.Log("Dir: " + Dir);
        UnityEngine.Debug.Log("RotateType: " + RotateType);
        
    }

}

public class DT_ITEMKINDINFO :PROTOCOLDEFINE
{
    public byte SubLstFalg ;
    public uint KindID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(SubLstFalg), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(KindID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            SubLstFalg = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            KindID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("SubLstFalg: " + SubLstFalg);
        UnityEngine.Debug.Log("KindID: " + KindID);
        
    }

}

public class PKT_CLIGS_SKILL_DAMAGE_REQ :PROTOCOLDEFINE
{
    public uint EventID ;
    public uint TargetID ;
    public uint SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(EventID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            EventID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            SkillID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("EventID: " + EventID);
        UnityEngine.Debug.Log("TargetID: " + TargetID);
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class PKT_CLIGS_ITEMUSE_ACK :PROTOCOLDEFINE
{
    public uint ItemObjID ;
    public uint TargetRoleObjID ;
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ItemObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetRoleObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ItemObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetRoleObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ItemObjID: " + ItemObjID);
        UnityEngine.Debug.Log("TargetRoleObjID: " + TargetRoleObjID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class CLTDT_SELF_EQUIPTMENTSINFO :PROTOCOLDEFINE
{
    public DT_ITEMINFO[] BodyPackge  = new DT_ITEMINFO[MAX_BODYPACKAGE_COUNT];
    public DT_ITEMINFO[] Equiptments  = new DT_ITEMINFO[MAX_BODYEQUIPTMENT_COUNT];
    public ushort PackgeOpenSize ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            
            if(MAX_BODYPACKAGE_COUNT > BodyPackge.Length)
            {
                return null;
            }
            for (int i=0; i<MAX_BODYPACKAGE_COUNT; ++i)
            {
                
                int _BodyPackge_temp_capacity = 0;
                byte[] _BodyPackge_temp = BodyPackge[i].GetSendbuf(ref _BodyPackge_temp_capacity);
                if(_BodyPackge_temp == null)
                {
                    return null;
                }
                Array.Copy(_BodyPackge_temp, 0, c, capacity, _BodyPackge_temp_capacity);
                capacity += _BodyPackge_temp_capacity;

            }

            
            if(MAX_BODYEQUIPTMENT_COUNT > Equiptments.Length)
            {
                return null;
            }
            for (int i=0; i<MAX_BODYEQUIPTMENT_COUNT; ++i)
            {
                
                int _Equiptments_temp_capacity = 0;
                byte[] _Equiptments_temp = Equiptments[i].GetSendbuf(ref _Equiptments_temp_capacity);
                if(_Equiptments_temp == null)
                {
                    return null;
                }
                Array.Copy(_Equiptments_temp, 0, c, capacity, _Equiptments_temp_capacity);
                capacity += _Equiptments_temp_capacity;

            }

            Array.Copy(BitConverter.GetBytes(PackgeOpenSize), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            
            //if(BodyPackge.Length > MAX_BODYPACKAGE_COUNT)
            //{
            //    return -1;
            //}
            for (int i=0; i<MAX_BODYPACKAGE_COUNT; ++i)
            {
                
                DT_ITEMINFO _BodyPackge = new DT_ITEMINFO();
                int _BodyPackge_indent = _BodyPackge.Parse(recvBuf, indent);
                if (_BodyPackge_indent == -1)
                {
                    return -1;
                }
                BodyPackge[i] = _BodyPackge;
                indent = _BodyPackge_indent;

            }

            
            //if(Equiptments.Length > MAX_BODYEQUIPTMENT_COUNT)
            //{
            //    return -1;
            //}
            for (int i=0; i<MAX_BODYEQUIPTMENT_COUNT; ++i)
            {
                
                DT_ITEMINFO _Equiptments = new DT_ITEMINFO();
                int _Equiptments_indent = _Equiptments.Parse(recvBuf, indent);
                if (_Equiptments_indent == -1)
                {
                    return -1;
                }
                Equiptments[i] = _Equiptments;
                indent = _Equiptments_indent;

            }

            PackgeOpenSize = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        foreach(DT_ITEMINFO o in BodyPackge){UnityEngine.Debug.Log("BodyPackge[]: ") ;o.DebugPrint();}
        foreach(DT_ITEMINFO o in Equiptments){UnityEngine.Debug.Log("Equiptments[]: ") ;o.DebugPrint();}
        UnityEngine.Debug.Log("PackgeOpenSize: " + PackgeOpenSize);
        
    }

}

public class PKT_CLIGS_TASKDETAIL_ACK :PROTOCOLDEFINE
{
    public byte TaskState ;
    public CLTDT_CLIGS_TASK_DETAIL TaskDetail  = new CLTDT_CLIGS_TASK_DETAIL();
    public uint TaskID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TaskState), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            int _TaskDetail_temp_capacity = 0;
            byte[] _TaskDetail_temp = TaskDetail.GetSendbuf(ref _TaskDetail_temp_capacity);
            if(_TaskDetail_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskDetail_temp, 0, c, capacity, _TaskDetail_temp_capacity);
            capacity += _TaskDetail_temp_capacity;

            Array.Copy(BitConverter.GetBytes(TaskID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TaskState = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            CLTDT_CLIGS_TASK_DETAIL _TaskDetail = new CLTDT_CLIGS_TASK_DETAIL();
            int _TaskDetail_indent = _TaskDetail.Parse(recvBuf, indent);
            if (_TaskDetail_indent == -1)
            {
                return -1;
            }
            TaskDetail = _TaskDetail;
            indent = _TaskDetail_indent;

            TaskID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskState: " + TaskState);
        UnityEngine.Debug.Log("TaskDetail: ") ;TaskDetail.DebugPrint();
        UnityEngine.Debug.Log("TaskID: " + TaskID);
        
    }

}

public class PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF :PROTOCOLDEFINE
{
    public PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF ChessList  = new PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF();
    public uint NextSceneMapTypeId ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _ChessList_temp_capacity = 0;
            byte[] _ChessList_temp = ChessList.GetSendbuf(ref _ChessList_temp_capacity);
            if(_ChessList_temp == null)
            {
                return null;
            }
            Array.Copy(_ChessList_temp, 0, c, capacity, _ChessList_temp_capacity);
            capacity += _ChessList_temp_capacity;

            Array.Copy(BitConverter.GetBytes(NextSceneMapTypeId), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF _ChessList = new PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF();
            int _ChessList_indent = _ChessList.Parse(recvBuf, indent);
            if (_ChessList_indent == -1)
            {
                return -1;
            }
            ChessList = _ChessList;
            indent = _ChessList_indent;

            NextSceneMapTypeId = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ChessList: ") ;ChessList.DebugPrint();
        UnityEngine.Debug.Log("NextSceneMapTypeId: " + NextSceneMapTypeId);
        
    }

}

public class PKT_CLIDB_VALID_ROLELIST_ACK :PROTOCOLDEFINE
{
    public byte Count ;
    public CLTDT_LISTROLEINFO[] RoleInfo  = new CLTDT_LISTROLEINFO[MAX_VALID_ROLELIST_COUNT];
    public int ErrCode ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(Count), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            
            if(Count > MAX_VALID_ROLELIST_COUNT)
            {
                return null;
            }

            if(Count > RoleInfo.Length)
            {
                return null;
            }
            for (int i=0; i<Count; ++i)
            {
                
                int _RoleInfo_temp_capacity = 0;
                byte[] _RoleInfo_temp = RoleInfo[i].GetSendbuf(ref _RoleInfo_temp_capacity);
                if(_RoleInfo_temp == null)
                {
                    return null;
                }
                Array.Copy(_RoleInfo_temp, 0, c, capacity, _RoleInfo_temp_capacity);
                capacity += _RoleInfo_temp_capacity;

            }

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            Count = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            
            if(Count > MAX_VALID_ROLELIST_COUNT)
            {
                return -1;
            }

            //if(RoleInfo.Length > Count)
            //{
            //    return -1;
            //}
            for (int i=0; i<Count; ++i)
            {
                
                CLTDT_LISTROLEINFO _RoleInfo = new CLTDT_LISTROLEINFO();
                int _RoleInfo_indent = _RoleInfo.Parse(recvBuf, indent);
                if (_RoleInfo_indent == -1)
                {
                    return -1;
                }
                RoleInfo[i] = _RoleInfo;
                indent = _RoleInfo_indent;

            }

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Count: " + Count);
        foreach(CLTDT_LISTROLEINFO o in RoleInfo){UnityEngine.Debug.Log("RoleInfo[]: ") ;o.DebugPrint();}
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        
    }

}

public class DT_3DPOS :PROTOCOLDEFINE
{
    public float PosZ ;
    public float PosX ;
    public float PosY ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PosZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        
    }

}

public class PKT_CLICOM_LOCKCLI_NTF :PROTOCOLDEFINE
{
    public byte LockType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(LockType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            LockType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("LockType: " + LockType);
        
    }

}

public class PKT_DT_LOGIN_INTERMEDIATE :PROTOCOLDEFINE
{
    public byte[] Info  = new byte[INFO_LEN];
    public int SubAck ;
    public int InfoLen ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            
            if(InfoLen > INFO_LEN)
            {
                return null;
            }

            if(InfoLen > Info.Length)
            {
                return null;
            }
            for (int i=0; i<InfoLen; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(Info[i]), 0, c, capacity, sizeof(byte));
                capacity += sizeof(byte);

            }

            Array.Copy(BitConverter.GetBytes(SubAck), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(InfoLen), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            
            if(InfoLen > INFO_LEN)
            {
                return -1;
            }

            //if(Info.Length > InfoLen)
            //{
            //    return -1;
            //}
            for (int i=0; i<InfoLen; ++i)
            {
                
                Info[i] = (byte)BitConverter.ToChar(recvBuf, indent);
                indent += sizeof(byte);

            }

            SubAck = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            InfoLen = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        foreach(byte o in Info){UnityEngine.Debug.Log("Info[]: " + o);}
        UnityEngine.Debug.Log("SubAck: " + SubAck);
        UnityEngine.Debug.Log("InfoLen: " + InfoLen);
        
    }

}

public class PKT_CLIDB_DELETEROLE_REQ :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLIDB_SELECTROLE_ACK :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public int ErrCode ;
    public uint GameServerID ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(GameServerID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            GameServerID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("GameServerID: " + GameServerID);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_GSCLI_SKILL_EVENT_NTF :PROTOCOLDEFINE
{
    public uint CastID ;
    public ushort EventID ;
    public ushort TargetCount ;
    public DT_3DPOS Pos  = new DT_3DPOS();
    public uint[] TagetList  = new uint[50];
    public DT_3DPOS Dir  = new DT_3DPOS();
    public uint SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(CastID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(EventID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(TargetCount), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            int _Pos_temp_capacity = 0;
            byte[] _Pos_temp = Pos.GetSendbuf(ref _Pos_temp_capacity);
            if(_Pos_temp == null)
            {
                return null;
            }
            Array.Copy(_Pos_temp, 0, c, capacity, _Pos_temp_capacity);
            capacity += _Pos_temp_capacity;

            
            if(TargetCount > 50)
            {
                return null;
            }

            if(TargetCount > TagetList.Length)
            {
                return null;
            }
            for (int i=0; i<TargetCount; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(TagetList[i]), 0, c, capacity, sizeof(uint));
                capacity += sizeof(uint);

            }

            int _Dir_temp_capacity = 0;
            byte[] _Dir_temp = Dir.GetSendbuf(ref _Dir_temp_capacity);
            if(_Dir_temp == null)
            {
                return null;
            }
            Array.Copy(_Dir_temp, 0, c, capacity, _Dir_temp_capacity);
            capacity += _Dir_temp_capacity;

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            CastID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            EventID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            TargetCount = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            DT_3DPOS _Pos = new DT_3DPOS();
            int _Pos_indent = _Pos.Parse(recvBuf, indent);
            if (_Pos_indent == -1)
            {
                return -1;
            }
            Pos = _Pos;
            indent = _Pos_indent;

            
            if(TargetCount > 50)
            {
                return -1;
            }

            //if(TagetList.Length > TargetCount)
            //{
            //    return -1;
            //}
            for (int i=0; i<TargetCount; ++i)
            {
                
                TagetList[i] = BitConverter.ToUInt32(recvBuf, indent);
                indent += sizeof(uint);

            }

            DT_3DPOS _Dir = new DT_3DPOS();
            int _Dir_indent = _Dir.Parse(recvBuf, indent);
            if (_Dir_indent == -1)
            {
                return -1;
            }
            Dir = _Dir;
            indent = _Dir_indent;

            SkillID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("CastID: " + CastID);
        UnityEngine.Debug.Log("EventID: " + EventID);
        UnityEngine.Debug.Log("TargetCount: " + TargetCount);
        UnityEngine.Debug.Log("Pos: ") ;Pos.DebugPrint();
        foreach(uint o in TagetList){UnityEngine.Debug.Log("TagetList[]: " + o);}
        UnityEngine.Debug.Log("Dir: ") ;Dir.DebugPrint();
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class PKT_CLIGS_ITEMSMITHING_REQ :PROTOCOLDEFINE
{
    public uint ItemObjID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ItemObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ItemObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ItemObjID: " + ItemObjID);
        
    }

}

public class PKT_GSCLI_ROLE_VELOCITY_NTF :PROTOCOLDEFINE
{
    public float DirZ ;
    public float DirY ;
    public float DirX ;
    public float PosZ ;
    public float PosX ;
    public float PosY ;
    public uint CasterID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(DirZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(DirX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosZ), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosX), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(PosY), 0, c, capacity, sizeof(float));
            capacity += sizeof(float);

            Array.Copy(BitConverter.GetBytes(CasterID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            DirZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            DirX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosZ = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosX = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            PosY = BitConverter.ToSingle(recvBuf, indent);
            indent += sizeof(float);

            CasterID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("DirZ: " + DirZ);
        UnityEngine.Debug.Log("DirY: " + DirY);
        UnityEngine.Debug.Log("DirX: " + DirX);
        UnityEngine.Debug.Log("PosZ: " + PosZ);
        UnityEngine.Debug.Log("PosX: " + PosX);
        UnityEngine.Debug.Log("PosY: " + PosY);
        UnityEngine.Debug.Log("CasterID: " + CasterID);
        
    }

}

public class PKT_CLIDB_CREATEROLE_ACK :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public CLTDT_LISTROLEINFO RoleInfo  = new CLTDT_LISTROLEINFO();
    public string UserID  = "" ;
    public int ErrCode ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            int _RoleInfo_temp_capacity = 0;
            byte[] _RoleInfo_temp = RoleInfo.GetSendbuf(ref _RoleInfo_temp_capacity);
            if(_RoleInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_RoleInfo_temp, 0, c, capacity, _RoleInfo_temp_capacity);
            capacity += _RoleInfo_temp_capacity;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            CLTDT_LISTROLEINFO _RoleInfo = new CLTDT_LISTROLEINFO();
            int _RoleInfo_indent = _RoleInfo.Parse(recvBuf, indent);
            if (_RoleInfo_indent == -1)
            {
                return -1;
            }
            RoleInfo = _RoleInfo;
            indent = _RoleInfo_indent;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("RoleInfo: ") ;RoleInfo.DebugPrint();
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLILS_LOGIN_ACK :PROTOCOLDEFINE
{
    public PKT_DT_ACT_REPLY Reply  = new PKT_DT_ACT_REPLY();
    public byte AckType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _Reply_temp_capacity = 0;
            byte[] _Reply_temp = Reply.GetSendbuf(ref _Reply_temp_capacity);
            if(_Reply_temp == null)
            {
                return null;
            }
            Array.Copy(_Reply_temp, 0, c, capacity, _Reply_temp_capacity);
            capacity += _Reply_temp_capacity;

            Array.Copy(BitConverter.GetBytes(AckType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            PKT_DT_ACT_REPLY _Reply = new PKT_DT_ACT_REPLY();
            int _Reply_indent = _Reply.Parse(recvBuf, indent);
            if (_Reply_indent == -1)
            {
                return -1;
            }
            Reply = _Reply;
            indent = _Reply_indent;

            AckType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("Reply: ") ;Reply.DebugPrint();
        UnityEngine.Debug.Log("AckType: " + AckType);
        
    }

}

public class PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF :PROTOCOLDEFINE
{
    public uint NextSceneMapTypeId ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NextSceneMapTypeId), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NextSceneMapTypeId = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NextSceneMapTypeId: " + NextSceneMapTypeId);
        
    }

}

public class DT_MSG :PROTOCOLDEFINE
{
    public string MsgContent  = "" ;
    public byte MsgType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (MSG_LEN > MsgContent.Length)
            //{
            //    return null;
            //}
            short _MsgContent_length =(short)(MsgContent.Length);
            Array.Copy(BitConverter.GetBytes(_MsgContent_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(MsgContent), 0, c, capacity, _MsgContent_length);
            capacity += _MsgContent_length;

            Array.Copy(BitConverter.GetBytes(MsgType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _MsgContent_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_MsgContent_length>MSG_LEN)
            //{
            //    return -1;
            //}
            MsgContent = Encoding.ASCII.GetString(recvBuf, indent, _MsgContent_length);
            indent += _MsgContent_length;

            MsgType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("MsgContent: " + MsgContent);
        UnityEngine.Debug.Log("MsgType: " + MsgType);
        
    }

}

public class PKT_CLIGS_ROLE_APPEARCHANGE_NTF :PROTOCOLDEFINE
{
    public CLTDT_AVATAR_INFO AvatarInfo  = new CLTDT_AVATAR_INFO();
    public uint ObjID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _AvatarInfo_temp_capacity = 0;
            byte[] _AvatarInfo_temp = AvatarInfo.GetSendbuf(ref _AvatarInfo_temp_capacity);
            if(_AvatarInfo_temp == null)
            {
                return null;
            }
            Array.Copy(_AvatarInfo_temp, 0, c, capacity, _AvatarInfo_temp_capacity);
            capacity += _AvatarInfo_temp_capacity;

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            CLTDT_AVATAR_INFO _AvatarInfo = new CLTDT_AVATAR_INFO();
            int _AvatarInfo_indent = _AvatarInfo.Parse(recvBuf, indent);
            if (_AvatarInfo_indent == -1)
            {
                return -1;
            }
            AvatarInfo = _AvatarInfo;
            indent = _AvatarInfo_indent;

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("AvatarInfo: ") ;AvatarInfo.DebugPrint();
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        
    }

}

public class PKT_GSCLI_ROLE_ACTION_NTF :PROTOCOLDEFINE
{
    public uint RoleID ;
    public ushort ActionID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(RoleID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ActionID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            RoleID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ActionID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("RoleID: " + RoleID);
        UnityEngine.Debug.Log("ActionID: " + ActionID);
        
    }

}

public class CLTDT_CLIGS_TASK_DETAIL :PROTOCOLDEFINE
{
    public CLTDT_CLIGS_TASK_REPLAY TaskAccept  = new CLTDT_CLIGS_TASK_REPLAY();
    public CLTDT_CLIGS_TASK_CONTENT TaskUnAccept  = new CLTDT_CLIGS_TASK_CONTENT();
    public CLTDT_CLIGS_TASK_REPLAY TaskFinish  = new CLTDT_CLIGS_TASK_REPLAY();
    public CLTDT_CLIGS_TASK_REPLAY TaskFailed  = new CLTDT_CLIGS_TASK_REPLAY();
    public CLTDT_CLIGS_TASK_CONTENT TaskFulfil  = new CLTDT_CLIGS_TASK_CONTENT();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            int _TaskAccept_temp_capacity = 0;
            byte[] _TaskAccept_temp = TaskAccept.GetSendbuf(ref _TaskAccept_temp_capacity);
            if(_TaskAccept_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskAccept_temp, 0, c, capacity, _TaskAccept_temp_capacity);
            capacity += _TaskAccept_temp_capacity;

            int _TaskUnAccept_temp_capacity = 0;
            byte[] _TaskUnAccept_temp = TaskUnAccept.GetSendbuf(ref _TaskUnAccept_temp_capacity);
            if(_TaskUnAccept_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskUnAccept_temp, 0, c, capacity, _TaskUnAccept_temp_capacity);
            capacity += _TaskUnAccept_temp_capacity;

            int _TaskFinish_temp_capacity = 0;
            byte[] _TaskFinish_temp = TaskFinish.GetSendbuf(ref _TaskFinish_temp_capacity);
            if(_TaskFinish_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskFinish_temp, 0, c, capacity, _TaskFinish_temp_capacity);
            capacity += _TaskFinish_temp_capacity;

            int _TaskFailed_temp_capacity = 0;
            byte[] _TaskFailed_temp = TaskFailed.GetSendbuf(ref _TaskFailed_temp_capacity);
            if(_TaskFailed_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskFailed_temp, 0, c, capacity, _TaskFailed_temp_capacity);
            capacity += _TaskFailed_temp_capacity;

            int _TaskFulfil_temp_capacity = 0;
            byte[] _TaskFulfil_temp = TaskFulfil.GetSendbuf(ref _TaskFulfil_temp_capacity);
            if(_TaskFulfil_temp == null)
            {
                return null;
            }
            Array.Copy(_TaskFulfil_temp, 0, c, capacity, _TaskFulfil_temp_capacity);
            capacity += _TaskFulfil_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            CLTDT_CLIGS_TASK_REPLAY _TaskAccept = new CLTDT_CLIGS_TASK_REPLAY();
            int _TaskAccept_indent = _TaskAccept.Parse(recvBuf, indent);
            if (_TaskAccept_indent == -1)
            {
                return -1;
            }
            TaskAccept = _TaskAccept;
            indent = _TaskAccept_indent;

            CLTDT_CLIGS_TASK_CONTENT _TaskUnAccept = new CLTDT_CLIGS_TASK_CONTENT();
            int _TaskUnAccept_indent = _TaskUnAccept.Parse(recvBuf, indent);
            if (_TaskUnAccept_indent == -1)
            {
                return -1;
            }
            TaskUnAccept = _TaskUnAccept;
            indent = _TaskUnAccept_indent;

            CLTDT_CLIGS_TASK_REPLAY _TaskFinish = new CLTDT_CLIGS_TASK_REPLAY();
            int _TaskFinish_indent = _TaskFinish.Parse(recvBuf, indent);
            if (_TaskFinish_indent == -1)
            {
                return -1;
            }
            TaskFinish = _TaskFinish;
            indent = _TaskFinish_indent;

            CLTDT_CLIGS_TASK_REPLAY _TaskFailed = new CLTDT_CLIGS_TASK_REPLAY();
            int _TaskFailed_indent = _TaskFailed.Parse(recvBuf, indent);
            if (_TaskFailed_indent == -1)
            {
                return -1;
            }
            TaskFailed = _TaskFailed;
            indent = _TaskFailed_indent;

            CLTDT_CLIGS_TASK_CONTENT _TaskFulfil = new CLTDT_CLIGS_TASK_CONTENT();
            int _TaskFulfil_indent = _TaskFulfil.Parse(recvBuf, indent);
            if (_TaskFulfil_indent == -1)
            {
                return -1;
            }
            TaskFulfil = _TaskFulfil;
            indent = _TaskFulfil_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TaskAccept: ") ;TaskAccept.DebugPrint();
        UnityEngine.Debug.Log("TaskUnAccept: ") ;TaskUnAccept.DebugPrint();
        UnityEngine.Debug.Log("TaskFinish: ") ;TaskFinish.DebugPrint();
        UnityEngine.Debug.Log("TaskFailed: ") ;TaskFailed.DebugPrint();
        UnityEngine.Debug.Log("TaskFulfil: ") ;TaskFulfil.DebugPrint();
        
    }

}

public class PKT_CLIGS_ROLE_CHAT_REQ :PROTOCOLDEFINE
{
    public uint RoleID ;
    public byte ChatType ;
    public string Context  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(RoleID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ChatType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            //if (MAX_NPC_TALK_LEN > Context.Length)
            //{
            //    return null;
            //}
            short _Context_length =(short)(Context.Length);
            Array.Copy(BitConverter.GetBytes(_Context_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(Context), 0, c, capacity, _Context_length);
            capacity += _Context_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            RoleID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ChatType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            short _Context_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_Context_length>MAX_NPC_TALK_LEN)
            //{
            //    return -1;
            //}
            Context = Encoding.ASCII.GetString(recvBuf, indent, _Context_length);
            indent += _Context_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("RoleID: " + RoleID);
        UnityEngine.Debug.Log("ChatType: " + ChatType);
        UnityEngine.Debug.Log("Context: " + Context);
        
    }

}

public class PKT_CLIGS_TIME_CHECK :PROTOCOLDEFINE
{
    public uint TargetTime ;
    public uint ElapseTime ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(TargetTime), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ElapseTime), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            TargetTime = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ElapseTime = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("TargetTime: " + TargetTime);
        UnityEngine.Debug.Log("ElapseTime: " + ElapseTime);
        
    }

}

public class PKT_CLIGS_ITEM_CHECK :PROTOCOLDEFINE
{
    public uint NeedCount ;
    public uint GetCount ;
    public uint ObjKindId ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(NeedCount), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(GetCount), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ObjKindId), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            NeedCount = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            GetCount = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ObjKindId = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("NeedCount: " + NeedCount);
        UnityEngine.Debug.Log("GetCount: " + GetCount);
        UnityEngine.Debug.Log("ObjKindId: " + ObjKindId);
        
    }

}

public class PKT_CLIGS_ITEMUSE_REQ :PROTOCOLDEFINE
{
    public uint ExInfo ;
    public uint ItemObjID ;
    public uint TargetRoleObjID ;
    public DT_POS Pos  = new DT_POS();

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(ExInfo), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ItemObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(TargetRoleObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _Pos_temp_capacity = 0;
            byte[] _Pos_temp = Pos.GetSendbuf(ref _Pos_temp_capacity);
            if(_Pos_temp == null)
            {
                return null;
            }
            Array.Copy(_Pos_temp, 0, c, capacity, _Pos_temp_capacity);
            capacity += _Pos_temp_capacity;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            ExInfo = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ItemObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            TargetRoleObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            DT_POS _Pos = new DT_POS();
            int _Pos_indent = _Pos.Parse(recvBuf, indent);
            if (_Pos_indent == -1)
            {
                return -1;
            }
            Pos = _Pos;
            indent = _Pos_indent;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("ExInfo: " + ExInfo);
        UnityEngine.Debug.Log("ItemObjID: " + ItemObjID);
        UnityEngine.Debug.Log("TargetRoleObjID: " + TargetRoleObjID);
        UnityEngine.Debug.Log("Pos: ") ;Pos.DebugPrint();
        
    }

}

public class PKT_CLIGS_ROLE_MOVE_ACK :PROTOCOLDEFINE
{
    public byte MoveGait ;
    public uint TimeStamp ;
    public Base3dPosition Postion  = new Base3dPosition();
    public int ErrCode ;
    public byte MoveType ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(MoveGait), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(TimeStamp), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            int _Postion_temp_capacity = 0;
            byte[] _Postion_temp = Postion.GetSendbuf(ref _Postion_temp_capacity);
            if(_Postion_temp == null)
            {
                return null;
            }
            Array.Copy(_Postion_temp, 0, c, capacity, _Postion_temp_capacity);
            capacity += _Postion_temp_capacity;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            Array.Copy(BitConverter.GetBytes(MoveType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            MoveGait = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            TimeStamp = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Base3dPosition _Postion = new Base3dPosition();
            int _Postion_indent = _Postion.Parse(recvBuf, indent);
            if (_Postion_indent == -1)
            {
                return -1;
            }
            Postion = _Postion;
            indent = _Postion_indent;

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            MoveType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("MoveGait: " + MoveGait);
        UnityEngine.Debug.Log("TimeStamp: " + TimeStamp);
        UnityEngine.Debug.Log("Postion: ") ;Postion.DebugPrint();
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("MoveType: " + MoveType);
        
    }

}

public class PKT_CLIGS_ENTERGS_ACK :PROTOCOLDEFINE
{
    public string UserType  = "" ;
    public string UserID  = "" ;
    public int ErrCode ;
    public string RoleName  = "" ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            //if (USERTYPE_LEN > UserType.Length)
            //{
            //    return null;
            //}
            short _UserType_length =(short)(UserType.Length);
            Array.Copy(BitConverter.GetBytes(_UserType_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserType), 0, c, capacity, _UserType_length);
            capacity += _UserType_length;

            //if (PTID_LEN > UserID.Length)
            //{
            //    return null;
            //}
            short _UserID_length =(short)(UserID.Length);
            Array.Copy(BitConverter.GetBytes(_UserID_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(UserID), 0, c, capacity, _UserID_length);
            capacity += _UserID_length;

            Array.Copy(BitConverter.GetBytes(ErrCode), 0, c, capacity, sizeof(int));
            capacity += sizeof(int);

            //if (ROLENAME_LEN > RoleName.Length)
            //{
            //    return null;
            //}
            short _RoleName_length =(short)(RoleName.Length);
            Array.Copy(BitConverter.GetBytes(_RoleName_length), 0, c, capacity, sizeof(short));
            capacity += sizeof(short);
            Array.Copy(Encoding.ASCII.GetBytes(RoleName), 0, c, capacity, _RoleName_length);
            capacity += _RoleName_length;

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            short _UserType_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserType_length>USERTYPE_LEN)
            //{
            //    return -1;
            //}
            UserType = Encoding.ASCII.GetString(recvBuf, indent, _UserType_length);
            indent += _UserType_length;

            short _UserID_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_UserID_length>PTID_LEN)
            //{
            //    return -1;
            //}
            UserID = Encoding.ASCII.GetString(recvBuf, indent, _UserID_length);
            indent += _UserID_length;

            ErrCode = BitConverter.ToInt32(recvBuf, indent);
            indent += sizeof(int);

            short _RoleName_length = BitConverter.ToInt16(recvBuf, indent);
            indent += sizeof(short);
            //if (_RoleName_length>ROLENAME_LEN)
            //{
            //    return -1;
            //}
            RoleName = Encoding.ASCII.GetString(recvBuf, indent, _RoleName_length);
            indent += _RoleName_length;

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("UserType: " + UserType);
        UnityEngine.Debug.Log("UserID: " + UserID);
        UnityEngine.Debug.Log("ErrCode: " + ErrCode);
        UnityEngine.Debug.Log("RoleName: " + RoleName);
        
    }

}

public class PKT_CLIGS_CREATURE_SKILLCHANGE_NTF :PROTOCOLDEFINE
{
    public uint CreatureID ;
    public byte ChangeType ;
    public ushort SkillID ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            Array.Copy(BitConverter.GetBytes(CreatureID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(ChangeType), 0, c, capacity, sizeof(byte));
            capacity += sizeof(byte);

            Array.Copy(BitConverter.GetBytes(SkillID), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            CreatureID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            ChangeType = (byte)BitConverter.ToChar(recvBuf, indent);
            indent += sizeof(byte);

            SkillID = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        UnityEngine.Debug.Log("CreatureID: " + CreatureID);
        UnityEngine.Debug.Log("ChangeType: " + ChangeType);
        UnityEngine.Debug.Log("SkillID: " + SkillID);
        
    }

}

public class DT_ITEMINFO :PROTOCOLDEFINE
{
    public byte[] ExtInfo  = new byte[MAX_ITEM_EXT_NUM];
    public uint ItemKindID ;
    public ushort PileCount ;
    public uint ObjID ;
    public ushort Durability ;

    
    public override byte[] GetSendbuf(ref int capacity)
    {
        try
        {
            byte[] c = new byte[1024];
            capacity = 0;
            
            
            if(MAX_ITEM_EXT_NUM > ExtInfo.Length)
            {
                return null;
            }
            for (int i=0; i<MAX_ITEM_EXT_NUM; ++i)
            {
                
                Array.Copy(BitConverter.GetBytes(ExtInfo[i]), 0, c, capacity, sizeof(byte));
                capacity += sizeof(byte);

            }

            Array.Copy(BitConverter.GetBytes(ItemKindID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(PileCount), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            Array.Copy(BitConverter.GetBytes(ObjID), 0, c, capacity, sizeof(uint));
            capacity += sizeof(uint);

            Array.Copy(BitConverter.GetBytes(Durability), 0, c, capacity, sizeof(ushort));
            capacity += sizeof(ushort);

            return c;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return null;
    }


    
    public int Parse(byte[] recvBuf, int indent)
    {
        try
        {
            
            
            //if(ExtInfo.Length > MAX_ITEM_EXT_NUM)
            //{
            //    return -1;
            //}
            for (int i=0; i<MAX_ITEM_EXT_NUM; ++i)
            {
                
                ExtInfo[i] = (byte)BitConverter.ToChar(recvBuf, indent);
                indent += sizeof(byte);

            }

            ItemKindID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            PileCount = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            ObjID = BitConverter.ToUInt32(recvBuf, indent);
            indent += sizeof(uint);

            Durability = BitConverter.ToUInt16(recvBuf, indent);
            indent += sizeof(ushort);

            return indent;
        }
        catch (System.Exception ex)
        {
            ex.GetType();
        }
        return -1;
    }

    
    public void DebugPrint()
    {
        foreach(byte o in ExtInfo){UnityEngine.Debug.Log("ExtInfo[]: " + o);}
        UnityEngine.Debug.Log("ItemKindID: " + ItemKindID);
        UnityEngine.Debug.Log("PileCount: " + PileCount);
        UnityEngine.Debug.Log("ObjID: " + ObjID);
        UnityEngine.Debug.Log("Durability: " + Durability);
        
    }

}


public class CProtocolMgr:MSGID
{

    public int Handle(byte[] recvbuf, int size, CsdSocket_TCP peer)
    {
        int indent = 0;
        try
        {
            if (size < 6)
            {
                return 0;
            }
            CSHARP_MSGHEADER head = new CSHARP_MSGHEADER();
            indent = head.Parse(recvbuf, indent);
            if (indent == -1)
            {
                UnityEngine.Debug.Log("parse head failed");
                return -1;
            }
            if (head.msgLength+6 > size)
            {
                return 0;
            }
            switch ((int)head.msgID)
            {
            
            case 4100:
                {
                    PKT_GTCOM_CLIENT_DOWN_RPT _PKT_GTCOM_CLIENT_DOWN_RPT = new PKT_GTCOM_CLIENT_DOWN_RPT();
                    int __PKT_GTCOM_CLIENT_DOWN_RPT_indent = _PKT_GTCOM_CLIENT_DOWN_RPT.Parse(recvbuf, indent);
                    if (-1 != __PKT_GTCOM_CLIENT_DOWN_RPT_indent)
                    {
                        handle_PKT_GTCOM_CLIENT_DOWN_RPT(_PKT_GTCOM_CLIENT_DOWN_RPT, peer);
                        indent = __PKT_GTCOM_CLIENT_DOWN_RPT_indent;
                    }
                }
                break;

            case 4101:
                {
                    PKT_GTCOM_CLIENT_CLOSE_NTF _PKT_GTCOM_CLIENT_CLOSE_NTF = new PKT_GTCOM_CLIENT_CLOSE_NTF();
                    int __PKT_GTCOM_CLIENT_CLOSE_NTF_indent = _PKT_GTCOM_CLIENT_CLOSE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GTCOM_CLIENT_CLOSE_NTF_indent)
                    {
                        handle_PKT_GTCOM_CLIENT_CLOSE_NTF(_PKT_GTCOM_CLIENT_CLOSE_NTF, peer);
                        indent = __PKT_GTCOM_CLIENT_CLOSE_NTF_indent;
                    }
                }
                break;

            case 2:
                {
                    DT_MSG _DT_MSG = new DT_MSG();
                    int __DT_MSG_indent = _DT_MSG.Parse(recvbuf, indent);
                    if (-1 != __DT_MSG_indent)
                    {
                        handle_DT_MSG(_DT_MSG, peer);
                        indent = __DT_MSG_indent;
                    }
                }
                break;

            case 10:
                {
                    PKT_CLIBS_GETGT_REQ _PKT_CLIBS_GETGT_REQ = new PKT_CLIBS_GETGT_REQ();
                    int __PKT_CLIBS_GETGT_REQ_indent = _PKT_CLIBS_GETGT_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIBS_GETGT_REQ_indent)
                    {
                        handle_PKT_CLIBS_GETGT_REQ(_PKT_CLIBS_GETGT_REQ, peer);
                        indent = __PKT_CLIBS_GETGT_REQ_indent;
                    }
                }
                break;

            case 11:
                {
                    PKT_CLIBS_GETGT_ACK _PKT_CLIBS_GETGT_ACK = new PKT_CLIBS_GETGT_ACK();
                    int __PKT_CLIBS_GETGT_ACK_indent = _PKT_CLIBS_GETGT_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIBS_GETGT_ACK_indent)
                    {
                        handle_PKT_CLIBS_GETGT_ACK(_PKT_CLIBS_GETGT_ACK, peer);
                        indent = __PKT_CLIBS_GETGT_ACK_indent;
                    }
                }
                break;

            case 30:
                {
                    PKT_CLIGT_QUEUE_NTF _PKT_CLIGT_QUEUE_NTF = new PKT_CLIGT_QUEUE_NTF();
                    int __PKT_CLIGT_QUEUE_NTF_indent = _PKT_CLIGT_QUEUE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGT_QUEUE_NTF_indent)
                    {
                        handle_PKT_CLIGT_QUEUE_NTF(_PKT_CLIGT_QUEUE_NTF, peer);
                        indent = __PKT_CLIGT_QUEUE_NTF_indent;
                    }
                }
                break;

            case 31:
                {
                    PKT_CLICT_QUEUE_UPDATE_NTF _PKT_CLICT_QUEUE_UPDATE_NTF = new PKT_CLICT_QUEUE_UPDATE_NTF();
                    int __PKT_CLICT_QUEUE_UPDATE_NTF_indent = _PKT_CLICT_QUEUE_UPDATE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLICT_QUEUE_UPDATE_NTF_indent)
                    {
                        handle_PKT_CLICT_QUEUE_UPDATE_NTF(_PKT_CLICT_QUEUE_UPDATE_NTF, peer);
                        indent = __PKT_CLICT_QUEUE_UPDATE_NTF_indent;
                    }
                }
                break;

            case 32:
                {
                    PKT_CLICT_QUEUEFIN_NTF _PKT_CLICT_QUEUEFIN_NTF = new PKT_CLICT_QUEUEFIN_NTF();
                    int __PKT_CLICT_QUEUEFIN_NTF_indent = _PKT_CLICT_QUEUEFIN_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLICT_QUEUEFIN_NTF_indent)
                    {
                        handle_PKT_CLICT_QUEUEFIN_NTF(_PKT_CLICT_QUEUEFIN_NTF, peer);
                        indent = __PKT_CLICT_QUEUEFIN_NTF_indent;
                    }
                }
                break;

            case 33:
                {
                    PKT_CLICOM_LOGOUT_REQ _PKT_CLICOM_LOGOUT_REQ = new PKT_CLICOM_LOGOUT_REQ();
                    int __PKT_CLICOM_LOGOUT_REQ_indent = _PKT_CLICOM_LOGOUT_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLICOM_LOGOUT_REQ_indent)
                    {
                        handle_PKT_CLICOM_LOGOUT_REQ(_PKT_CLICOM_LOGOUT_REQ, peer);
                        indent = __PKT_CLICOM_LOGOUT_REQ_indent;
                    }
                }
                break;

            case 34:
                {
                    PKT_CLICOM_LOGOUT_ACK _PKT_CLICOM_LOGOUT_ACK = new PKT_CLICOM_LOGOUT_ACK();
                    int __PKT_CLICOM_LOGOUT_ACK_indent = _PKT_CLICOM_LOGOUT_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLICOM_LOGOUT_ACK_indent)
                    {
                        handle_PKT_CLICOM_LOGOUT_ACK(_PKT_CLICOM_LOGOUT_ACK, peer);
                        indent = __PKT_CLICOM_LOGOUT_ACK_indent;
                    }
                }
                break;

            case 35:
                {
                    PKT_CLICOM_SHUTDOWNCLI_NTF _PKT_CLICOM_SHUTDOWNCLI_NTF = new PKT_CLICOM_SHUTDOWNCLI_NTF();
                    int __PKT_CLICOM_SHUTDOWNCLI_NTF_indent = _PKT_CLICOM_SHUTDOWNCLI_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLICOM_SHUTDOWNCLI_NTF_indent)
                    {
                        handle_PKT_CLICOM_SHUTDOWNCLI_NTF(_PKT_CLICOM_SHUTDOWNCLI_NTF, peer);
                        indent = __PKT_CLICOM_SHUTDOWNCLI_NTF_indent;
                    }
                }
                break;

            case 36:
                {
                    PKT_CLICOM_LOCKCLI_NTF _PKT_CLICOM_LOCKCLI_NTF = new PKT_CLICOM_LOCKCLI_NTF();
                    int __PKT_CLICOM_LOCKCLI_NTF_indent = _PKT_CLICOM_LOCKCLI_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLICOM_LOCKCLI_NTF_indent)
                    {
                        handle_PKT_CLICOM_LOCKCLI_NTF(_PKT_CLICOM_LOCKCLI_NTF, peer);
                        indent = __PKT_CLICOM_LOCKCLI_NTF_indent;
                    }
                }
                break;

            case 20:
                {
                    PKT_CLIDB_VALID_ROLELIST_REQ _PKT_CLIDB_VALID_ROLELIST_REQ = new PKT_CLIDB_VALID_ROLELIST_REQ();
                    int __PKT_CLIDB_VALID_ROLELIST_REQ_indent = _PKT_CLIDB_VALID_ROLELIST_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_VALID_ROLELIST_REQ_indent)
                    {
                        handle_PKT_CLIDB_VALID_ROLELIST_REQ(_PKT_CLIDB_VALID_ROLELIST_REQ, peer);
                        indent = __PKT_CLIDB_VALID_ROLELIST_REQ_indent;
                    }
                }
                break;

            case 21:
                {
                    PKT_CLIDB_VALID_ROLELIST_ACK _PKT_CLIDB_VALID_ROLELIST_ACK = new PKT_CLIDB_VALID_ROLELIST_ACK();
                    int __PKT_CLIDB_VALID_ROLELIST_ACK_indent = _PKT_CLIDB_VALID_ROLELIST_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_VALID_ROLELIST_ACK_indent)
                    {
                        handle_PKT_CLIDB_VALID_ROLELIST_ACK(_PKT_CLIDB_VALID_ROLELIST_ACK, peer);
                        indent = __PKT_CLIDB_VALID_ROLELIST_ACK_indent;
                    }
                }
                break;

            case 22:
                {
                    PKT_CLIDB_SELECTROLE_REQ _PKT_CLIDB_SELECTROLE_REQ = new PKT_CLIDB_SELECTROLE_REQ();
                    int __PKT_CLIDB_SELECTROLE_REQ_indent = _PKT_CLIDB_SELECTROLE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_SELECTROLE_REQ_indent)
                    {
                        handle_PKT_CLIDB_SELECTROLE_REQ(_PKT_CLIDB_SELECTROLE_REQ, peer);
                        indent = __PKT_CLIDB_SELECTROLE_REQ_indent;
                    }
                }
                break;

            case 23:
                {
                    PKT_CLIDB_SELECTROLE_ACK _PKT_CLIDB_SELECTROLE_ACK = new PKT_CLIDB_SELECTROLE_ACK();
                    int __PKT_CLIDB_SELECTROLE_ACK_indent = _PKT_CLIDB_SELECTROLE_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_SELECTROLE_ACK_indent)
                    {
                        handle_PKT_CLIDB_SELECTROLE_ACK(_PKT_CLIDB_SELECTROLE_ACK, peer);
                        indent = __PKT_CLIDB_SELECTROLE_ACK_indent;
                    }
                }
                break;

            case 80:
                {
                    PKT_CLIDB_CREATEROLE_REQ _PKT_CLIDB_CREATEROLE_REQ = new PKT_CLIDB_CREATEROLE_REQ();
                    int __PKT_CLIDB_CREATEROLE_REQ_indent = _PKT_CLIDB_CREATEROLE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_CREATEROLE_REQ_indent)
                    {
                        handle_PKT_CLIDB_CREATEROLE_REQ(_PKT_CLIDB_CREATEROLE_REQ, peer);
                        indent = __PKT_CLIDB_CREATEROLE_REQ_indent;
                    }
                }
                break;

            case 81:
                {
                    PKT_CLIDB_CREATEROLE_ACK _PKT_CLIDB_CREATEROLE_ACK = new PKT_CLIDB_CREATEROLE_ACK();
                    int __PKT_CLIDB_CREATEROLE_ACK_indent = _PKT_CLIDB_CREATEROLE_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_CREATEROLE_ACK_indent)
                    {
                        handle_PKT_CLIDB_CREATEROLE_ACK(_PKT_CLIDB_CREATEROLE_ACK, peer);
                        indent = __PKT_CLIDB_CREATEROLE_ACK_indent;
                    }
                }
                break;

            case 82:
                {
                    PKT_CLIDB_DELETEROLE_REQ _PKT_CLIDB_DELETEROLE_REQ = new PKT_CLIDB_DELETEROLE_REQ();
                    int __PKT_CLIDB_DELETEROLE_REQ_indent = _PKT_CLIDB_DELETEROLE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_DELETEROLE_REQ_indent)
                    {
                        handle_PKT_CLIDB_DELETEROLE_REQ(_PKT_CLIDB_DELETEROLE_REQ, peer);
                        indent = __PKT_CLIDB_DELETEROLE_REQ_indent;
                    }
                }
                break;

            case 83:
                {
                    PKT_CLIDB_DELETEROLE_ACK _PKT_CLIDB_DELETEROLE_ACK = new PKT_CLIDB_DELETEROLE_ACK();
                    int __PKT_CLIDB_DELETEROLE_ACK_indent = _PKT_CLIDB_DELETEROLE_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIDB_DELETEROLE_ACK_indent)
                    {
                        handle_PKT_CLIDB_DELETEROLE_ACK(_PKT_CLIDB_DELETEROLE_ACK, peer);
                        indent = __PKT_CLIDB_DELETEROLE_ACK_indent;
                    }
                }
                break;

            case 1000:
                {
                    PKT_CLIGS_ENTERGS_REQ _PKT_CLIGS_ENTERGS_REQ = new PKT_CLIGS_ENTERGS_REQ();
                    int __PKT_CLIGS_ENTERGS_REQ_indent = _PKT_CLIGS_ENTERGS_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ENTERGS_REQ_indent)
                    {
                        handle_PKT_CLIGS_ENTERGS_REQ(_PKT_CLIGS_ENTERGS_REQ, peer);
                        indent = __PKT_CLIGS_ENTERGS_REQ_indent;
                    }
                }
                break;

            case 1001:
                {
                    PKT_CLIGS_ENTERGS_ACK _PKT_CLIGS_ENTERGS_ACK = new PKT_CLIGS_ENTERGS_ACK();
                    int __PKT_CLIGS_ENTERGS_ACK_indent = _PKT_CLIGS_ENTERGS_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ENTERGS_ACK_indent)
                    {
                        handle_PKT_CLIGS_ENTERGS_ACK(_PKT_CLIGS_ENTERGS_ACK, peer);
                        indent = __PKT_CLIGS_ENTERGS_ACK_indent;
                    }
                }
                break;

            case 1002:
                {
                    PKT_CLIGS_SELF_INFO_NTF _PKT_CLIGS_SELF_INFO_NTF = new PKT_CLIGS_SELF_INFO_NTF();
                    int __PKT_CLIGS_SELF_INFO_NTF_indent = _PKT_CLIGS_SELF_INFO_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SELF_INFO_NTF_indent)
                    {
                        handle_PKT_CLIGS_SELF_INFO_NTF(_PKT_CLIGS_SELF_INFO_NTF, peer);
                        indent = __PKT_CLIGS_SELF_INFO_NTF_indent;
                    }
                }
                break;

            case 1003:
                {
                    PKT_CLIGS_ROLE_APPEAR_NTF _PKT_CLIGS_ROLE_APPEAR_NTF = new PKT_CLIGS_ROLE_APPEAR_NTF();
                    int __PKT_CLIGS_ROLE_APPEAR_NTF_indent = _PKT_CLIGS_ROLE_APPEAR_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_APPEAR_NTF_indent)
                    {
                        handle_PKT_CLIGS_ROLE_APPEAR_NTF(_PKT_CLIGS_ROLE_APPEAR_NTF, peer);
                        indent = __PKT_CLIGS_ROLE_APPEAR_NTF_indent;
                    }
                }
                break;

            case 1004:
                {
                    PKT_CLIGS_NPC_APPEAR_NTF _PKT_CLIGS_NPC_APPEAR_NTF = new PKT_CLIGS_NPC_APPEAR_NTF();
                    int __PKT_CLIGS_NPC_APPEAR_NTF_indent = _PKT_CLIGS_NPC_APPEAR_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPC_APPEAR_NTF_indent)
                    {
                        handle_PKT_CLIGS_NPC_APPEAR_NTF(_PKT_CLIGS_NPC_APPEAR_NTF, peer);
                        indent = __PKT_CLIGS_NPC_APPEAR_NTF_indent;
                    }
                }
                break;

            case 1005:
                {
                    PKT_CLIGS_OBJ_DISAPPEAR_NTF _PKT_CLIGS_OBJ_DISAPPEAR_NTF = new PKT_CLIGS_OBJ_DISAPPEAR_NTF();
                    int __PKT_CLIGS_OBJ_DISAPPEAR_NTF_indent = _PKT_CLIGS_OBJ_DISAPPEAR_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_OBJ_DISAPPEAR_NTF_indent)
                    {
                        handle_PKT_CLIGS_OBJ_DISAPPEAR_NTF(_PKT_CLIGS_OBJ_DISAPPEAR_NTF, peer);
                        indent = __PKT_CLIGS_OBJ_DISAPPEAR_NTF_indent;
                    }
                }
                break;

            case 1006:
                {
                    PKT_CLIGS_ROLE_MOVE_REQ _PKT_CLIGS_ROLE_MOVE_REQ = new PKT_CLIGS_ROLE_MOVE_REQ();
                    int __PKT_CLIGS_ROLE_MOVE_REQ_indent = _PKT_CLIGS_ROLE_MOVE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_MOVE_REQ_indent)
                    {
                        handle_PKT_CLIGS_ROLE_MOVE_REQ(_PKT_CLIGS_ROLE_MOVE_REQ, peer);
                        indent = __PKT_CLIGS_ROLE_MOVE_REQ_indent;
                    }
                }
                break;

            case 1007:
                {
                    PKT_CLIGS_ROLE_MOVE_ACK _PKT_CLIGS_ROLE_MOVE_ACK = new PKT_CLIGS_ROLE_MOVE_ACK();
                    int __PKT_CLIGS_ROLE_MOVE_ACK_indent = _PKT_CLIGS_ROLE_MOVE_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_MOVE_ACK_indent)
                    {
                        handle_PKT_CLIGS_ROLE_MOVE_ACK(_PKT_CLIGS_ROLE_MOVE_ACK, peer);
                        indent = __PKT_CLIGS_ROLE_MOVE_ACK_indent;
                    }
                }
                break;

            case 1008:
                {
                    PKT_CLIGS_OBJ_MOVE_NTF _PKT_CLIGS_OBJ_MOVE_NTF = new PKT_CLIGS_OBJ_MOVE_NTF();
                    int __PKT_CLIGS_OBJ_MOVE_NTF_indent = _PKT_CLIGS_OBJ_MOVE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_OBJ_MOVE_NTF_indent)
                    {
                        handle_PKT_CLIGS_OBJ_MOVE_NTF(_PKT_CLIGS_OBJ_MOVE_NTF, peer);
                        indent = __PKT_CLIGS_OBJ_MOVE_NTF_indent;
                    }
                }
                break;

            case 1009:
                {
                    PKT_CLIGS_ROLE_DRESS_REQ _PKT_CLIGS_ROLE_DRESS_REQ = new PKT_CLIGS_ROLE_DRESS_REQ();
                    int __PKT_CLIGS_ROLE_DRESS_REQ_indent = _PKT_CLIGS_ROLE_DRESS_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_DRESS_REQ_indent)
                    {
                        handle_PKT_CLIGS_ROLE_DRESS_REQ(_PKT_CLIGS_ROLE_DRESS_REQ, peer);
                        indent = __PKT_CLIGS_ROLE_DRESS_REQ_indent;
                    }
                }
                break;

            case 1010:
                {
                    PKT_CLIGS_ROLE_DRESS_ACK _PKT_CLIGS_ROLE_DRESS_ACK = new PKT_CLIGS_ROLE_DRESS_ACK();
                    int __PKT_CLIGS_ROLE_DRESS_ACK_indent = _PKT_CLIGS_ROLE_DRESS_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_DRESS_ACK_indent)
                    {
                        handle_PKT_CLIGS_ROLE_DRESS_ACK(_PKT_CLIGS_ROLE_DRESS_ACK, peer);
                        indent = __PKT_CLIGS_ROLE_DRESS_ACK_indent;
                    }
                }
                break;

            case 1011:
                {
                    PKT_CLIGS_ROLE_APPEARCHANGE_NTF _PKT_CLIGS_ROLE_APPEARCHANGE_NTF = new PKT_CLIGS_ROLE_APPEARCHANGE_NTF();
                    int __PKT_CLIGS_ROLE_APPEARCHANGE_NTF_indent = _PKT_CLIGS_ROLE_APPEARCHANGE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_APPEARCHANGE_NTF_indent)
                    {
                        handle_PKT_CLIGS_ROLE_APPEARCHANGE_NTF(_PKT_CLIGS_ROLE_APPEARCHANGE_NTF, peer);
                        indent = __PKT_CLIGS_ROLE_APPEARCHANGE_NTF_indent;
                    }
                }
                break;

            case 1012:
                {
                    PKT_CLIGS_SKILL_ATTACK_REQ _PKT_CLIGS_SKILL_ATTACK_REQ = new PKT_CLIGS_SKILL_ATTACK_REQ();
                    int __PKT_CLIGS_SKILL_ATTACK_REQ_indent = _PKT_CLIGS_SKILL_ATTACK_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SKILL_ATTACK_REQ_indent)
                    {
                        handle_PKT_CLIGS_SKILL_ATTACK_REQ(_PKT_CLIGS_SKILL_ATTACK_REQ, peer);
                        indent = __PKT_CLIGS_SKILL_ATTACK_REQ_indent;
                    }
                }
                break;

            case 1013:
                {
                    PKT_CLIGS_SKILL_ATTACK_ACK _PKT_CLIGS_SKILL_ATTACK_ACK = new PKT_CLIGS_SKILL_ATTACK_ACK();
                    int __PKT_CLIGS_SKILL_ATTACK_ACK_indent = _PKT_CLIGS_SKILL_ATTACK_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SKILL_ATTACK_ACK_indent)
                    {
                        handle_PKT_CLIGS_SKILL_ATTACK_ACK(_PKT_CLIGS_SKILL_ATTACK_ACK, peer);
                        indent = __PKT_CLIGS_SKILL_ATTACK_ACK_indent;
                    }
                }
                break;

            case 1014:
                {
                    PKT_CLIGS_SKILL_ATTACK_NTF _PKT_CLIGS_SKILL_ATTACK_NTF = new PKT_CLIGS_SKILL_ATTACK_NTF();
                    int __PKT_CLIGS_SKILL_ATTACK_NTF_indent = _PKT_CLIGS_SKILL_ATTACK_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SKILL_ATTACK_NTF_indent)
                    {
                        handle_PKT_CLIGS_SKILL_ATTACK_NTF(_PKT_CLIGS_SKILL_ATTACK_NTF, peer);
                        indent = __PKT_CLIGS_SKILL_ATTACK_NTF_indent;
                    }
                }
                break;

            case 1015:
                {
                    PKT_CLIGS_CREATURE_SKILLCHANGE_NTF _PKT_CLIGS_CREATURE_SKILLCHANGE_NTF = new PKT_CLIGS_CREATURE_SKILLCHANGE_NTF();
                    int __PKT_CLIGS_CREATURE_SKILLCHANGE_NTF_indent = _PKT_CLIGS_CREATURE_SKILLCHANGE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_CREATURE_SKILLCHANGE_NTF_indent)
                    {
                        handle_PKT_CLIGS_CREATURE_SKILLCHANGE_NTF(_PKT_CLIGS_CREATURE_SKILLCHANGE_NTF, peer);
                        indent = __PKT_CLIGS_CREATURE_SKILLCHANGE_NTF_indent;
                    }
                }
                break;

            case 1016:
                {
                    PKT_CLIGS_ROLE_CHAT_REQ _PKT_CLIGS_ROLE_CHAT_REQ = new PKT_CLIGS_ROLE_CHAT_REQ();
                    int __PKT_CLIGS_ROLE_CHAT_REQ_indent = _PKT_CLIGS_ROLE_CHAT_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_CHAT_REQ_indent)
                    {
                        handle_PKT_CLIGS_ROLE_CHAT_REQ(_PKT_CLIGS_ROLE_CHAT_REQ, peer);
                        indent = __PKT_CLIGS_ROLE_CHAT_REQ_indent;
                    }
                }
                break;

            case 1017:
                {
                    PKT_CLIGS_LOADFINISH_RPT _PKT_CLIGS_LOADFINISH_RPT = new PKT_CLIGS_LOADFINISH_RPT();
                    int __PKT_CLIGS_LOADFINISH_RPT_indent = _PKT_CLIGS_LOADFINISH_RPT.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_LOADFINISH_RPT_indent)
                    {
                        handle_PKT_CLIGS_LOADFINISH_RPT(_PKT_CLIGS_LOADFINISH_RPT, peer);
                        indent = __PKT_CLIGS_LOADFINISH_RPT_indent;
                    }
                }
                break;

            case 1018:
                {
                    PKT_CLIGS_LEAVEGS_REQ _PKT_CLIGS_LEAVEGS_REQ = new PKT_CLIGS_LEAVEGS_REQ();
                    int __PKT_CLIGS_LEAVEGS_REQ_indent = _PKT_CLIGS_LEAVEGS_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_LEAVEGS_REQ_indent)
                    {
                        handle_PKT_CLIGS_LEAVEGS_REQ(_PKT_CLIGS_LEAVEGS_REQ, peer);
                        indent = __PKT_CLIGS_LEAVEGS_REQ_indent;
                    }
                }
                break;

            case 1019:
                {
                    PKT_CLIGS_LEAVEGS_ACK _PKT_CLIGS_LEAVEGS_ACK = new PKT_CLIGS_LEAVEGS_ACK();
                    int __PKT_CLIGS_LEAVEGS_ACK_indent = _PKT_CLIGS_LEAVEGS_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_LEAVEGS_ACK_indent)
                    {
                        handle_PKT_CLIGS_LEAVEGS_ACK(_PKT_CLIGS_LEAVEGS_ACK, peer);
                        indent = __PKT_CLIGS_LEAVEGS_ACK_indent;
                    }
                }
                break;

            case 1020:
                {
                    PKT_CLIGS_NPC_TALK_REQ _PKT_CLIGS_NPC_TALK_REQ = new PKT_CLIGS_NPC_TALK_REQ();
                    int __PKT_CLIGS_NPC_TALK_REQ_indent = _PKT_CLIGS_NPC_TALK_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPC_TALK_REQ_indent)
                    {
                        handle_PKT_CLIGS_NPC_TALK_REQ(_PKT_CLIGS_NPC_TALK_REQ, peer);
                        indent = __PKT_CLIGS_NPC_TALK_REQ_indent;
                    }
                }
                break;

            case 1021:
                {
                    PKT_CLIGS_NPC_TALK_ACK _PKT_CLIGS_NPC_TALK_ACK = new PKT_CLIGS_NPC_TALK_ACK();
                    int __PKT_CLIGS_NPC_TALK_ACK_indent = _PKT_CLIGS_NPC_TALK_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPC_TALK_ACK_indent)
                    {
                        handle_PKT_CLIGS_NPC_TALK_ACK(_PKT_CLIGS_NPC_TALK_ACK, peer);
                        indent = __PKT_CLIGS_NPC_TALK_ACK_indent;
                    }
                }
                break;

            case 1022:
                {
                    PKT_CLIGS_NPC_TALK_OVER_NTF _PKT_CLIGS_NPC_TALK_OVER_NTF = new PKT_CLIGS_NPC_TALK_OVER_NTF();
                    int __PKT_CLIGS_NPC_TALK_OVER_NTF_indent = _PKT_CLIGS_NPC_TALK_OVER_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPC_TALK_OVER_NTF_indent)
                    {
                        handle_PKT_CLIGS_NPC_TALK_OVER_NTF(_PKT_CLIGS_NPC_TALK_OVER_NTF, peer);
                        indent = __PKT_CLIGS_NPC_TALK_OVER_NTF_indent;
                    }
                }
                break;

            case 1023:
                {
                    PKT_CLIGS_SYNCTIME_REQ _PKT_CLIGS_SYNCTIME_REQ = new PKT_CLIGS_SYNCTIME_REQ();
                    int __PKT_CLIGS_SYNCTIME_REQ_indent = _PKT_CLIGS_SYNCTIME_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SYNCTIME_REQ_indent)
                    {
                        handle_PKT_CLIGS_SYNCTIME_REQ(_PKT_CLIGS_SYNCTIME_REQ, peer);
                        indent = __PKT_CLIGS_SYNCTIME_REQ_indent;
                    }
                }
                break;

            case 1024:
                {
                    PKT_CLIGS_SYNCTIME_ACK _PKT_CLIGS_SYNCTIME_ACK = new PKT_CLIGS_SYNCTIME_ACK();
                    int __PKT_CLIGS_SYNCTIME_ACK_indent = _PKT_CLIGS_SYNCTIME_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SYNCTIME_ACK_indent)
                    {
                        handle_PKT_CLIGS_SYNCTIME_ACK(_PKT_CLIGS_SYNCTIME_ACK, peer);
                        indent = __PKT_CLIGS_SYNCTIME_ACK_indent;
                    }
                }
                break;

            case 1025:
                {
                    PKT_CLIGS_ROLE_CHANGEDIR_REQ _PKT_CLIGS_ROLE_CHANGEDIR_REQ = new PKT_CLIGS_ROLE_CHANGEDIR_REQ();
                    int __PKT_CLIGS_ROLE_CHANGEDIR_REQ_indent = _PKT_CLIGS_ROLE_CHANGEDIR_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_CHANGEDIR_REQ_indent)
                    {
                        handle_PKT_CLIGS_ROLE_CHANGEDIR_REQ(_PKT_CLIGS_ROLE_CHANGEDIR_REQ, peer);
                        indent = __PKT_CLIGS_ROLE_CHANGEDIR_REQ_indent;
                    }
                }
                break;

            case 1026:
                {
                    PKT_CLIGS_ROLE_CHANGEDIR_ACK _PKT_CLIGS_ROLE_CHANGEDIR_ACK = new PKT_CLIGS_ROLE_CHANGEDIR_ACK();
                    int __PKT_CLIGS_ROLE_CHANGEDIR_ACK_indent = _PKT_CLIGS_ROLE_CHANGEDIR_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_CHANGEDIR_ACK_indent)
                    {
                        handle_PKT_CLIGS_ROLE_CHANGEDIR_ACK(_PKT_CLIGS_ROLE_CHANGEDIR_ACK, peer);
                        indent = __PKT_CLIGS_ROLE_CHANGEDIR_ACK_indent;
                    }
                }
                break;

            case 1027:
                {
                    PKT_CLIGS_OBJ_CHANGEDIR_NTF _PKT_CLIGS_OBJ_CHANGEDIR_NTF = new PKT_CLIGS_OBJ_CHANGEDIR_NTF();
                    int __PKT_CLIGS_OBJ_CHANGEDIR_NTF_indent = _PKT_CLIGS_OBJ_CHANGEDIR_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_OBJ_CHANGEDIR_NTF_indent)
                    {
                        handle_PKT_CLIGS_OBJ_CHANGEDIR_NTF(_PKT_CLIGS_OBJ_CHANGEDIR_NTF, peer);
                        indent = __PKT_CLIGS_OBJ_CHANGEDIR_NTF_indent;
                    }
                }
                break;

            case 1028:
                {
                    PKT_GSCLI_NPC_EVENT_NTF _PKT_GSCLI_NPC_EVENT_NTF = new PKT_GSCLI_NPC_EVENT_NTF();
                    int __PKT_GSCLI_NPC_EVENT_NTF_indent = _PKT_GSCLI_NPC_EVENT_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_NPC_EVENT_NTF_indent)
                    {
                        handle_PKT_GSCLI_NPC_EVENT_NTF(_PKT_GSCLI_NPC_EVENT_NTF, peer);
                        indent = __PKT_GSCLI_NPC_EVENT_NTF_indent;
                    }
                }
                break;

            case 1029:
                {
                    PKT_CLIGS_SKILL_EFFECT_REQ _PKT_CLIGS_SKILL_EFFECT_REQ = new PKT_CLIGS_SKILL_EFFECT_REQ();
                    int __PKT_CLIGS_SKILL_EFFECT_REQ_indent = _PKT_CLIGS_SKILL_EFFECT_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SKILL_EFFECT_REQ_indent)
                    {
                        handle_PKT_CLIGS_SKILL_EFFECT_REQ(_PKT_CLIGS_SKILL_EFFECT_REQ, peer);
                        indent = __PKT_CLIGS_SKILL_EFFECT_REQ_indent;
                    }
                }
                break;

            case 1030:
                {
                    PKT_GSCLI_SKILL_EFFECT_NTF _PKT_GSCLI_SKILL_EFFECT_NTF = new PKT_GSCLI_SKILL_EFFECT_NTF();
                    int __PKT_GSCLI_SKILL_EFFECT_NTF_indent = _PKT_GSCLI_SKILL_EFFECT_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_SKILL_EFFECT_NTF_indent)
                    {
                        handle_PKT_GSCLI_SKILL_EFFECT_NTF(_PKT_GSCLI_SKILL_EFFECT_NTF, peer);
                        indent = __PKT_GSCLI_SKILL_EFFECT_NTF_indent;
                    }
                }
                break;

            case 1031:
                {
                    PKT_CLIGS_ROLE_VELOCITY_REQ _PKT_CLIGS_ROLE_VELOCITY_REQ = new PKT_CLIGS_ROLE_VELOCITY_REQ();
                    int __PKT_CLIGS_ROLE_VELOCITY_REQ_indent = _PKT_CLIGS_ROLE_VELOCITY_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_VELOCITY_REQ_indent)
                    {
                        handle_PKT_CLIGS_ROLE_VELOCITY_REQ(_PKT_CLIGS_ROLE_VELOCITY_REQ, peer);
                        indent = __PKT_CLIGS_ROLE_VELOCITY_REQ_indent;
                    }
                }
                break;

            case 1032:
                {
                    PKT_GSCLI_ROLE_VELOCITY_NTF _PKT_GSCLI_ROLE_VELOCITY_NTF = new PKT_GSCLI_ROLE_VELOCITY_NTF();
                    int __PKT_GSCLI_ROLE_VELOCITY_NTF_indent = _PKT_GSCLI_ROLE_VELOCITY_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_ROLE_VELOCITY_NTF_indent)
                    {
                        handle_PKT_GSCLI_ROLE_VELOCITY_NTF(_PKT_GSCLI_ROLE_VELOCITY_NTF, peer);
                        indent = __PKT_GSCLI_ROLE_VELOCITY_NTF_indent;
                    }
                }
                break;

            case 1033:
                {
                    PKT_CLIGS_SKILL_DAMAGE_REQ _PKT_CLIGS_SKILL_DAMAGE_REQ = new PKT_CLIGS_SKILL_DAMAGE_REQ();
                    int __PKT_CLIGS_SKILL_DAMAGE_REQ_indent = _PKT_CLIGS_SKILL_DAMAGE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SKILL_DAMAGE_REQ_indent)
                    {
                        handle_PKT_CLIGS_SKILL_DAMAGE_REQ(_PKT_CLIGS_SKILL_DAMAGE_REQ, peer);
                        indent = __PKT_CLIGS_SKILL_DAMAGE_REQ_indent;
                    }
                }
                break;

            case 1034:
                {
                    PKT_GSCLI_SKILL_DAMAGE_NTF _PKT_GSCLI_SKILL_DAMAGE_NTF = new PKT_GSCLI_SKILL_DAMAGE_NTF();
                    int __PKT_GSCLI_SKILL_DAMAGE_NTF_indent = _PKT_GSCLI_SKILL_DAMAGE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_SKILL_DAMAGE_NTF_indent)
                    {
                        handle_PKT_GSCLI_SKILL_DAMAGE_NTF(_PKT_GSCLI_SKILL_DAMAGE_NTF, peer);
                        indent = __PKT_GSCLI_SKILL_DAMAGE_NTF_indent;
                    }
                }
                break;

            case 1035:
                {
                    PKT_CLIGS_ROLE_ACTION_REQ _PKT_CLIGS_ROLE_ACTION_REQ = new PKT_CLIGS_ROLE_ACTION_REQ();
                    int __PKT_CLIGS_ROLE_ACTION_REQ_indent = _PKT_CLIGS_ROLE_ACTION_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_ACTION_REQ_indent)
                    {
                        handle_PKT_CLIGS_ROLE_ACTION_REQ(_PKT_CLIGS_ROLE_ACTION_REQ, peer);
                        indent = __PKT_CLIGS_ROLE_ACTION_REQ_indent;
                    }
                }
                break;

            case 1036:
                {
                    PKT_GSCLI_ROLE_ACTION_NTF _PKT_GSCLI_ROLE_ACTION_NTF = new PKT_GSCLI_ROLE_ACTION_NTF();
                    int __PKT_GSCLI_ROLE_ACTION_NTF_indent = _PKT_GSCLI_ROLE_ACTION_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_ROLE_ACTION_NTF_indent)
                    {
                        handle_PKT_GSCLI_ROLE_ACTION_NTF(_PKT_GSCLI_ROLE_ACTION_NTF, peer);
                        indent = __PKT_GSCLI_ROLE_ACTION_NTF_indent;
                    }
                }
                break;

            case 1037:
                {
                    PKT_CLIGS_TASKDETAIL_REQ _PKT_CLIGS_TASKDETAIL_REQ = new PKT_CLIGS_TASKDETAIL_REQ();
                    int __PKT_CLIGS_TASKDETAIL_REQ_indent = _PKT_CLIGS_TASKDETAIL_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TASKDETAIL_REQ_indent)
                    {
                        handle_PKT_CLIGS_TASKDETAIL_REQ(_PKT_CLIGS_TASKDETAIL_REQ, peer);
                        indent = __PKT_CLIGS_TASKDETAIL_REQ_indent;
                    }
                }
                break;

            case 1038:
                {
                    PKT_CLIGS_TASKDETAIL_ACK _PKT_CLIGS_TASKDETAIL_ACK = new PKT_CLIGS_TASKDETAIL_ACK();
                    int __PKT_CLIGS_TASKDETAIL_ACK_indent = _PKT_CLIGS_TASKDETAIL_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TASKDETAIL_ACK_indent)
                    {
                        handle_PKT_CLIGS_TASKDETAIL_ACK(_PKT_CLIGS_TASKDETAIL_ACK, peer);
                        indent = __PKT_CLIGS_TASKDETAIL_ACK_indent;
                    }
                }
                break;

            case 1039:
                {
                    PKT_CLIGS_TASKOPERATE_REQ _PKT_CLIGS_TASKOPERATE_REQ = new PKT_CLIGS_TASKOPERATE_REQ();
                    int __PKT_CLIGS_TASKOPERATE_REQ_indent = _PKT_CLIGS_TASKOPERATE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TASKOPERATE_REQ_indent)
                    {
                        handle_PKT_CLIGS_TASKOPERATE_REQ(_PKT_CLIGS_TASKOPERATE_REQ, peer);
                        indent = __PKT_CLIGS_TASKOPERATE_REQ_indent;
                    }
                }
                break;

            case 1040:
                {
                    PKT_CLIGS_TASKOPERATE_ACK _PKT_CLIGS_TASKOPERATE_ACK = new PKT_CLIGS_TASKOPERATE_ACK();
                    int __PKT_CLIGS_TASKOPERATE_ACK_indent = _PKT_CLIGS_TASKOPERATE_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TASKOPERATE_ACK_indent)
                    {
                        handle_PKT_CLIGS_TASKOPERATE_ACK(_PKT_CLIGS_TASKOPERATE_ACK, peer);
                        indent = __PKT_CLIGS_TASKOPERATE_ACK_indent;
                    }
                }
                break;

            case 1041:
                {
                    PKT_CLIGS_TASKREWARD_NTF _PKT_CLIGS_TASKREWARD_NTF = new PKT_CLIGS_TASKREWARD_NTF();
                    int __PKT_CLIGS_TASKREWARD_NTF_indent = _PKT_CLIGS_TASKREWARD_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TASKREWARD_NTF_indent)
                    {
                        handle_PKT_CLIGS_TASKREWARD_NTF(_PKT_CLIGS_TASKREWARD_NTF, peer);
                        indent = __PKT_CLIGS_TASKREWARD_NTF_indent;
                    }
                }
                break;

            case 1042:
                {
                    PKT_CLIGS_TASKBAG_NTF _PKT_CLIGS_TASKBAG_NTF = new PKT_CLIGS_TASKBAG_NTF();
                    int __PKT_CLIGS_TASKBAG_NTF_indent = _PKT_CLIGS_TASKBAG_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TASKBAG_NTF_indent)
                    {
                        handle_PKT_CLIGS_TASKBAG_NTF(_PKT_CLIGS_TASKBAG_NTF, peer);
                        indent = __PKT_CLIGS_TASKBAG_NTF_indent;
                    }
                }
                break;

            case 1043:
                {
                    PKT_CLIGS_ITEMSMITHING_REQ _PKT_CLIGS_ITEMSMITHING_REQ = new PKT_CLIGS_ITEMSMITHING_REQ();
                    int __PKT_CLIGS_ITEMSMITHING_REQ_indent = _PKT_CLIGS_ITEMSMITHING_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ITEMSMITHING_REQ_indent)
                    {
                        handle_PKT_CLIGS_ITEMSMITHING_REQ(_PKT_CLIGS_ITEMSMITHING_REQ, peer);
                        indent = __PKT_CLIGS_ITEMSMITHING_REQ_indent;
                    }
                }
                break;

            case 1044:
                {
                    PKT_CLIGS_ITEMSMITHING_ACK _PKT_CLIGS_ITEMSMITHING_ACK = new PKT_CLIGS_ITEMSMITHING_ACK();
                    int __PKT_CLIGS_ITEMSMITHING_ACK_indent = _PKT_CLIGS_ITEMSMITHING_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ITEMSMITHING_ACK_indent)
                    {
                        handle_PKT_CLIGS_ITEMSMITHING_ACK(_PKT_CLIGS_ITEMSMITHING_ACK, peer);
                        indent = __PKT_CLIGS_ITEMSMITHING_ACK_indent;
                    }
                }
                break;

            case 1045:
                {
                    PKT_CLIGS_ITEMUSE_REQ _PKT_CLIGS_ITEMUSE_REQ = new PKT_CLIGS_ITEMUSE_REQ();
                    int __PKT_CLIGS_ITEMUSE_REQ_indent = _PKT_CLIGS_ITEMUSE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ITEMUSE_REQ_indent)
                    {
                        handle_PKT_CLIGS_ITEMUSE_REQ(_PKT_CLIGS_ITEMUSE_REQ, peer);
                        indent = __PKT_CLIGS_ITEMUSE_REQ_indent;
                    }
                }
                break;

            case 1046:
                {
                    PKT_CLIGS_ITEMUSE_ACK _PKT_CLIGS_ITEMUSE_ACK = new PKT_CLIGS_ITEMUSE_ACK();
                    int __PKT_CLIGS_ITEMUSE_ACK_indent = _PKT_CLIGS_ITEMUSE_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ITEMUSE_ACK_indent)
                    {
                        handle_PKT_CLIGS_ITEMUSE_ACK(_PKT_CLIGS_ITEMUSE_ACK, peer);
                        indent = __PKT_CLIGS_ITEMUSE_ACK_indent;
                    }
                }
                break;

            case 1047:
                {
                    PKT_CLIGS_SYNROLEPROP_NTF _PKT_CLIGS_SYNROLEPROP_NTF = new PKT_CLIGS_SYNROLEPROP_NTF();
                    int __PKT_CLIGS_SYNROLEPROP_NTF_indent = _PKT_CLIGS_SYNROLEPROP_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SYNROLEPROP_NTF_indent)
                    {
                        handle_PKT_CLIGS_SYNROLEPROP_NTF(_PKT_CLIGS_SYNROLEPROP_NTF, peer);
                        indent = __PKT_CLIGS_SYNROLEPROP_NTF_indent;
                    }
                }
                break;

            case 1048:
                {
                    PKT_CLIGS_CREATUREDIE_NTF _PKT_CLIGS_CREATUREDIE_NTF = new PKT_CLIGS_CREATUREDIE_NTF();
                    int __PKT_CLIGS_CREATUREDIE_NTF_indent = _PKT_CLIGS_CREATUREDIE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_CREATUREDIE_NTF_indent)
                    {
                        handle_PKT_CLIGS_CREATUREDIE_NTF(_PKT_CLIGS_CREATUREDIE_NTF, peer);
                        indent = __PKT_CLIGS_CREATUREDIE_NTF_indent;
                    }
                }
                break;

            case 1049:
                {
                    PKT_CLIGS_CREATUREDAMAGE_NTF _PKT_CLIGS_CREATUREDAMAGE_NTF = new PKT_CLIGS_CREATUREDAMAGE_NTF();
                    int __PKT_CLIGS_CREATUREDAMAGE_NTF_indent = _PKT_CLIGS_CREATUREDAMAGE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_CREATUREDAMAGE_NTF_indent)
                    {
                        handle_PKT_CLIGS_CREATUREDAMAGE_NTF(_PKT_CLIGS_CREATUREDAMAGE_NTF, peer);
                        indent = __PKT_CLIGS_CREATUREDAMAGE_NTF_indent;
                    }
                }
                break;

            case 1050:
                {
                    PKT_CLIGS_ROLESELFDIE_NTF _PKT_CLIGS_ROLESELFDIE_NTF = new PKT_CLIGS_ROLESELFDIE_NTF();
                    int __PKT_CLIGS_ROLESELFDIE_NTF_indent = _PKT_CLIGS_ROLESELFDIE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLESELFDIE_NTF_indent)
                    {
                        handle_PKT_CLIGS_ROLESELFDIE_NTF(_PKT_CLIGS_ROLESELFDIE_NTF, peer);
                        indent = __PKT_CLIGS_ROLESELFDIE_NTF_indent;
                    }
                }
                break;

            case 1051:
                {
                    PKT_CLIGS_PACKGECHANGE_NTF _PKT_CLIGS_PACKGECHANGE_NTF = new PKT_CLIGS_PACKGECHANGE_NTF();
                    int __PKT_CLIGS_PACKGECHANGE_NTF_indent = _PKT_CLIGS_PACKGECHANGE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_PACKGECHANGE_NTF_indent)
                    {
                        handle_PKT_CLIGS_PACKGECHANGE_NTF(_PKT_CLIGS_PACKGECHANGE_NTF, peer);
                        indent = __PKT_CLIGS_PACKGECHANGE_NTF_indent;
                    }
                }
                break;

            case 1052:
                {
                    PKT_CLIGS_NPCITEMKINDLST_NTF _PKT_CLIGS_NPCITEMKINDLST_NTF = new PKT_CLIGS_NPCITEMKINDLST_NTF();
                    int __PKT_CLIGS_NPCITEMKINDLST_NTF_indent = _PKT_CLIGS_NPCITEMKINDLST_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPCITEMKINDLST_NTF_indent)
                    {
                        handle_PKT_CLIGS_NPCITEMKINDLST_NTF(_PKT_CLIGS_NPCITEMKINDLST_NTF, peer);
                        indent = __PKT_CLIGS_NPCITEMKINDLST_NTF_indent;
                    }
                }
                break;

            case 1053:
                {
                    PKT_CLIGS_NPCITEMSUBLST_REQ _PKT_CLIGS_NPCITEMSUBLST_REQ = new PKT_CLIGS_NPCITEMSUBLST_REQ();
                    int __PKT_CLIGS_NPCITEMSUBLST_REQ_indent = _PKT_CLIGS_NPCITEMSUBLST_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPCITEMSUBLST_REQ_indent)
                    {
                        handle_PKT_CLIGS_NPCITEMSUBLST_REQ(_PKT_CLIGS_NPCITEMSUBLST_REQ, peer);
                        indent = __PKT_CLIGS_NPCITEMSUBLST_REQ_indent;
                    }
                }
                break;

            case 1054:
                {
                    PKT_CLIGS_NPCITEMSUBLST_ACK _PKT_CLIGS_NPCITEMSUBLST_ACK = new PKT_CLIGS_NPCITEMSUBLST_ACK();
                    int __PKT_CLIGS_NPCITEMSUBLST_ACK_indent = _PKT_CLIGS_NPCITEMSUBLST_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPCITEMSUBLST_ACK_indent)
                    {
                        handle_PKT_CLIGS_NPCITEMSUBLST_ACK(_PKT_CLIGS_NPCITEMSUBLST_ACK, peer);
                        indent = __PKT_CLIGS_NPCITEMSUBLST_ACK_indent;
                    }
                }
                break;

            case 1055:
                {
                    PKT_CLIGS_NPC_TALK_NTF _PKT_CLIGS_NPC_TALK_NTF = new PKT_CLIGS_NPC_TALK_NTF();
                    int __PKT_CLIGS_NPC_TALK_NTF_indent = _PKT_CLIGS_NPC_TALK_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_NPC_TALK_NTF_indent)
                    {
                        handle_PKT_CLIGS_NPC_TALK_NTF(_PKT_CLIGS_NPC_TALK_NTF, peer);
                        indent = __PKT_CLIGS_NPC_TALK_NTF_indent;
                    }
                }
                break;

            case 1056:
                {
                    PKT_GSCLI_ROLE_DATA_UPDATE_NTF _PKT_GSCLI_ROLE_DATA_UPDATE_NTF = new PKT_GSCLI_ROLE_DATA_UPDATE_NTF();
                    int __PKT_GSCLI_ROLE_DATA_UPDATE_NTF_indent = _PKT_GSCLI_ROLE_DATA_UPDATE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_ROLE_DATA_UPDATE_NTF_indent)
                    {
                        handle_PKT_GSCLI_ROLE_DATA_UPDATE_NTF(_PKT_GSCLI_ROLE_DATA_UPDATE_NTF, peer);
                        indent = __PKT_GSCLI_ROLE_DATA_UPDATE_NTF_indent;
                    }
                }
                break;

            case 1200:
                {
                    PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF _PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF = new PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF();
                    int __PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF_indent = _PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF_indent)
                    {
                        handle_PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF(_PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF, peer);
                        indent = __PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF_indent;
                    }
                }
                break;

            case 1201:
                {
                    PKT_CLIGS_ROLE_CHAT_NTF _PKT_CLIGS_ROLE_CHAT_NTF = new PKT_CLIGS_ROLE_CHAT_NTF();
                    int __PKT_CLIGS_ROLE_CHAT_NTF_indent = _PKT_CLIGS_ROLE_CHAT_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_ROLE_CHAT_NTF_indent)
                    {
                        handle_PKT_CLIGS_ROLE_CHAT_NTF(_PKT_CLIGS_ROLE_CHAT_NTF, peer);
                        indent = __PKT_CLIGS_ROLE_CHAT_NTF_indent;
                    }
                }
                break;

            case 1202:
                {
                    PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF _PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF = new PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF();
                    int __PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF_indent = _PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF_indent)
                    {
                        handle_PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF(_PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF, peer);
                        indent = __PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF_indent;
                    }
                }
                break;

            case 1203:
                {
                    PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF _PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF = new PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF();
                    int __PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF_indent = _PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF_indent)
                    {
                        handle_PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF(_PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF, peer);
                        indent = __PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF_indent;
                    }
                }
                break;

            case 1204:
                {
                    PKT_GSCLI_SELF_POSITION_NTF _PKT_GSCLI_SELF_POSITION_NTF = new PKT_GSCLI_SELF_POSITION_NTF();
                    int __PKT_GSCLI_SELF_POSITION_NTF_indent = _PKT_GSCLI_SELF_POSITION_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_SELF_POSITION_NTF_indent)
                    {
                        handle_PKT_GSCLI_SELF_POSITION_NTF(_PKT_GSCLI_SELF_POSITION_NTF, peer);
                        indent = __PKT_GSCLI_SELF_POSITION_NTF_indent;
                    }
                }
                break;

            case 1205:
                {
                    PKT_CLIGS_TRIGGER_ACTION_REQ _PKT_CLIGS_TRIGGER_ACTION_REQ = new PKT_CLIGS_TRIGGER_ACTION_REQ();
                    int __PKT_CLIGS_TRIGGER_ACTION_REQ_indent = _PKT_CLIGS_TRIGGER_ACTION_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TRIGGER_ACTION_REQ_indent)
                    {
                        handle_PKT_CLIGS_TRIGGER_ACTION_REQ(_PKT_CLIGS_TRIGGER_ACTION_REQ, peer);
                        indent = __PKT_CLIGS_TRIGGER_ACTION_REQ_indent;
                    }
                }
                break;

            case 1206:
                {
                    PKT_GSCLI_TRIGGER_ACTION_NTF _PKT_GSCLI_TRIGGER_ACTION_NTF = new PKT_GSCLI_TRIGGER_ACTION_NTF();
                    int __PKT_GSCLI_TRIGGER_ACTION_NTF_indent = _PKT_GSCLI_TRIGGER_ACTION_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_TRIGGER_ACTION_NTF_indent)
                    {
                        handle_PKT_GSCLI_TRIGGER_ACTION_NTF(_PKT_GSCLI_TRIGGER_ACTION_NTF, peer);
                        indent = __PKT_GSCLI_TRIGGER_ACTION_NTF_indent;
                    }
                }
                break;

            case 1207:
                {
                    PKT_GSCLI_TRIGGER_ACTION_ACK _PKT_GSCLI_TRIGGER_ACTION_ACK = new PKT_GSCLI_TRIGGER_ACTION_ACK();
                    int __PKT_GSCLI_TRIGGER_ACTION_ACK_indent = _PKT_GSCLI_TRIGGER_ACTION_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_TRIGGER_ACTION_ACK_indent)
                    {
                        handle_PKT_GSCLI_TRIGGER_ACTION_ACK(_PKT_GSCLI_TRIGGER_ACTION_ACK, peer);
                        indent = __PKT_GSCLI_TRIGGER_ACTION_ACK_indent;
                    }
                }
                break;

            case 1208:
                {
                    PKT_CLIGS_TRIGGER_DAMAGE_REQ _PKT_CLIGS_TRIGGER_DAMAGE_REQ = new PKT_CLIGS_TRIGGER_DAMAGE_REQ();
                    int __PKT_CLIGS_TRIGGER_DAMAGE_REQ_indent = _PKT_CLIGS_TRIGGER_DAMAGE_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_TRIGGER_DAMAGE_REQ_indent)
                    {
                        handle_PKT_CLIGS_TRIGGER_DAMAGE_REQ(_PKT_CLIGS_TRIGGER_DAMAGE_REQ, peer);
                        indent = __PKT_CLIGS_TRIGGER_DAMAGE_REQ_indent;
                    }
                }
                break;

            case 1500:
                {
                    PKT_CLIGS_SKILL_EVENT_REQ _PKT_CLIGS_SKILL_EVENT_REQ = new PKT_CLIGS_SKILL_EVENT_REQ();
                    int __PKT_CLIGS_SKILL_EVENT_REQ_indent = _PKT_CLIGS_SKILL_EVENT_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGS_SKILL_EVENT_REQ_indent)
                    {
                        handle_PKT_CLIGS_SKILL_EVENT_REQ(_PKT_CLIGS_SKILL_EVENT_REQ, peer);
                        indent = __PKT_CLIGS_SKILL_EVENT_REQ_indent;
                    }
                }
                break;

            case 1501:
                {
                    PKT_GSCLI_SKILL_EVENT_NTF _PKT_GSCLI_SKILL_EVENT_NTF = new PKT_GSCLI_SKILL_EVENT_NTF();
                    int __PKT_GSCLI_SKILL_EVENT_NTF_indent = _PKT_GSCLI_SKILL_EVENT_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_SKILL_EVENT_NTF_indent)
                    {
                        handle_PKT_GSCLI_SKILL_EVENT_NTF(_PKT_GSCLI_SKILL_EVENT_NTF, peer);
                        indent = __PKT_GSCLI_SKILL_EVENT_NTF_indent;
                    }
                }
                break;

            case 1502:
                {
                    PKT_GSCLI_BEATTACK_EVENT_NTF _PKT_GSCLI_BEATTACK_EVENT_NTF = new PKT_GSCLI_BEATTACK_EVENT_NTF();
                    int __PKT_GSCLI_BEATTACK_EVENT_NTF_indent = _PKT_GSCLI_BEATTACK_EVENT_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_GSCLI_BEATTACK_EVENT_NTF_indent)
                    {
                        handle_PKT_GSCLI_BEATTACK_EVENT_NTF(_PKT_GSCLI_BEATTACK_EVENT_NTF, peer);
                        indent = __PKT_GSCLI_BEATTACK_EVENT_NTF_indent;
                    }
                }
                break;

            case 12:
                {
                    PKT_CLILS_LOGIN_REQ _PKT_CLILS_LOGIN_REQ = new PKT_CLILS_LOGIN_REQ();
                    int __PKT_CLILS_LOGIN_REQ_indent = _PKT_CLILS_LOGIN_REQ.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLILS_LOGIN_REQ_indent)
                    {
                        handle_PKT_CLILS_LOGIN_REQ(_PKT_CLILS_LOGIN_REQ, peer);
                        indent = __PKT_CLILS_LOGIN_REQ_indent;
                    }
                }
                break;

            case 13:
                {
                    PKT_CLILS_LOGIN_ACK _PKT_CLILS_LOGIN_ACK = new PKT_CLILS_LOGIN_ACK();
                    int __PKT_CLILS_LOGIN_ACK_indent = _PKT_CLILS_LOGIN_ACK.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLILS_LOGIN_ACK_indent)
                    {
                        handle_PKT_CLILS_LOGIN_ACK(_PKT_CLILS_LOGIN_ACK, peer);
                        indent = __PKT_CLILS_LOGIN_ACK_indent;
                    }
                }
                break;

            case 1:
                {
                    PKT_CLIGT_HEARTBEAT_NTF _PKT_CLIGT_HEARTBEAT_NTF = new PKT_CLIGT_HEARTBEAT_NTF();
                    int __PKT_CLIGT_HEARTBEAT_NTF_indent = _PKT_CLIGT_HEARTBEAT_NTF.Parse(recvbuf, indent);
                    if (-1 != __PKT_CLIGT_HEARTBEAT_NTF_indent)
                    {
                        handle_PKT_CLIGT_HEARTBEAT_NTF(_PKT_CLIGT_HEARTBEAT_NTF, peer);
                        indent = __PKT_CLIGT_HEARTBEAT_NTF_indent;
                    }
                }
                break;
            default:
                {
                    UnityEngine.Debug.Log("unknown msgid :" + head.msgID);
                }
                break;
            }
        }
        catch (System.Exception )
        {
            
        }
        return indent;
    }


    public virtual void handle_PKT_GTCOM_CLIENT_DOWN_RPT(PKT_GTCOM_CLIENT_DOWN_RPT p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GTCOM_CLIENT_CLOSE_NTF(PKT_GTCOM_CLIENT_CLOSE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_DT_MSG(DT_MSG p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIBS_GETGT_REQ(PKT_CLIBS_GETGT_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIBS_GETGT_ACK(PKT_CLIBS_GETGT_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGT_QUEUE_NTF(PKT_CLIGT_QUEUE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLICT_QUEUE_UPDATE_NTF(PKT_CLICT_QUEUE_UPDATE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLICT_QUEUEFIN_NTF(PKT_CLICT_QUEUEFIN_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLICOM_LOGOUT_REQ(PKT_CLICOM_LOGOUT_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLICOM_LOGOUT_ACK(PKT_CLICOM_LOGOUT_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLICOM_SHUTDOWNCLI_NTF(PKT_CLICOM_SHUTDOWNCLI_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLICOM_LOCKCLI_NTF(PKT_CLICOM_LOCKCLI_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_VALID_ROLELIST_REQ(PKT_CLIDB_VALID_ROLELIST_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_VALID_ROLELIST_ACK(PKT_CLIDB_VALID_ROLELIST_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_SELECTROLE_REQ(PKT_CLIDB_SELECTROLE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_SELECTROLE_ACK(PKT_CLIDB_SELECTROLE_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_CREATEROLE_REQ(PKT_CLIDB_CREATEROLE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_CREATEROLE_ACK(PKT_CLIDB_CREATEROLE_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_DELETEROLE_REQ(PKT_CLIDB_DELETEROLE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIDB_DELETEROLE_ACK(PKT_CLIDB_DELETEROLE_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ENTERGS_REQ(PKT_CLIGS_ENTERGS_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ENTERGS_ACK(PKT_CLIGS_ENTERGS_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SELF_INFO_NTF(PKT_CLIGS_SELF_INFO_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_APPEAR_NTF(PKT_CLIGS_ROLE_APPEAR_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPC_APPEAR_NTF(PKT_CLIGS_NPC_APPEAR_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_OBJ_DISAPPEAR_NTF(PKT_CLIGS_OBJ_DISAPPEAR_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_MOVE_REQ(PKT_CLIGS_ROLE_MOVE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_MOVE_ACK(PKT_CLIGS_ROLE_MOVE_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_OBJ_MOVE_NTF(PKT_CLIGS_OBJ_MOVE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_DRESS_REQ(PKT_CLIGS_ROLE_DRESS_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_DRESS_ACK(PKT_CLIGS_ROLE_DRESS_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_APPEARCHANGE_NTF(PKT_CLIGS_ROLE_APPEARCHANGE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SKILL_ATTACK_REQ(PKT_CLIGS_SKILL_ATTACK_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SKILL_ATTACK_ACK(PKT_CLIGS_SKILL_ATTACK_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SKILL_ATTACK_NTF(PKT_CLIGS_SKILL_ATTACK_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_CREATURE_SKILLCHANGE_NTF(PKT_CLIGS_CREATURE_SKILLCHANGE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_CHAT_REQ(PKT_CLIGS_ROLE_CHAT_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_LOADFINISH_RPT(PKT_CLIGS_LOADFINISH_RPT p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_LEAVEGS_REQ(PKT_CLIGS_LEAVEGS_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_LEAVEGS_ACK(PKT_CLIGS_LEAVEGS_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPC_TALK_REQ(PKT_CLIGS_NPC_TALK_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPC_TALK_ACK(PKT_CLIGS_NPC_TALK_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPC_TALK_OVER_NTF(PKT_CLIGS_NPC_TALK_OVER_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SYNCTIME_REQ(PKT_CLIGS_SYNCTIME_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SYNCTIME_ACK(PKT_CLIGS_SYNCTIME_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_CHANGEDIR_REQ(PKT_CLIGS_ROLE_CHANGEDIR_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_CHANGEDIR_ACK(PKT_CLIGS_ROLE_CHANGEDIR_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_OBJ_CHANGEDIR_NTF(PKT_CLIGS_OBJ_CHANGEDIR_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_NPC_EVENT_NTF(PKT_GSCLI_NPC_EVENT_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SKILL_EFFECT_REQ(PKT_CLIGS_SKILL_EFFECT_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_SKILL_EFFECT_NTF(PKT_GSCLI_SKILL_EFFECT_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_VELOCITY_REQ(PKT_CLIGS_ROLE_VELOCITY_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_ROLE_VELOCITY_NTF(PKT_GSCLI_ROLE_VELOCITY_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SKILL_DAMAGE_REQ(PKT_CLIGS_SKILL_DAMAGE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_SKILL_DAMAGE_NTF(PKT_GSCLI_SKILL_DAMAGE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_ACTION_REQ(PKT_CLIGS_ROLE_ACTION_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_ROLE_ACTION_NTF(PKT_GSCLI_ROLE_ACTION_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TASKDETAIL_REQ(PKT_CLIGS_TASKDETAIL_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TASKDETAIL_ACK(PKT_CLIGS_TASKDETAIL_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TASKOPERATE_REQ(PKT_CLIGS_TASKOPERATE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TASKOPERATE_ACK(PKT_CLIGS_TASKOPERATE_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TASKREWARD_NTF(PKT_CLIGS_TASKREWARD_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TASKBAG_NTF(PKT_CLIGS_TASKBAG_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ITEMSMITHING_REQ(PKT_CLIGS_ITEMSMITHING_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ITEMSMITHING_ACK(PKT_CLIGS_ITEMSMITHING_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ITEMUSE_REQ(PKT_CLIGS_ITEMUSE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ITEMUSE_ACK(PKT_CLIGS_ITEMUSE_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SYNROLEPROP_NTF(PKT_CLIGS_SYNROLEPROP_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_CREATUREDIE_NTF(PKT_CLIGS_CREATUREDIE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_CREATUREDAMAGE_NTF(PKT_CLIGS_CREATUREDAMAGE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLESELFDIE_NTF(PKT_CLIGS_ROLESELFDIE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_PACKGECHANGE_NTF(PKT_CLIGS_PACKGECHANGE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPCITEMKINDLST_NTF(PKT_CLIGS_NPCITEMKINDLST_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPCITEMSUBLST_REQ(PKT_CLIGS_NPCITEMSUBLST_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPCITEMSUBLST_ACK(PKT_CLIGS_NPCITEMSUBLST_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_NPC_TALK_NTF(PKT_CLIGS_NPC_TALK_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_ROLE_DATA_UPDATE_NTF(PKT_GSCLI_ROLE_DATA_UPDATE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF(PKT_FUBEN_MAINSCENE_CHESS_LIST_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_ROLE_CHAT_NTF(PKT_CLIGS_ROLE_CHAT_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF(PKT_GSCLI_CHANGE_SCENE_NORMAL_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF(PKT_GSCLI_CHANGE_SCENE_FUBEN_MAINSCENE_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_SELF_POSITION_NTF(PKT_GSCLI_SELF_POSITION_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TRIGGER_ACTION_REQ(PKT_CLIGS_TRIGGER_ACTION_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_TRIGGER_ACTION_NTF(PKT_GSCLI_TRIGGER_ACTION_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_TRIGGER_ACTION_ACK(PKT_GSCLI_TRIGGER_ACTION_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_TRIGGER_DAMAGE_REQ(PKT_CLIGS_TRIGGER_DAMAGE_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGS_SKILL_EVENT_REQ(PKT_CLIGS_SKILL_EVENT_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_SKILL_EVENT_NTF(PKT_GSCLI_SKILL_EVENT_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_GSCLI_BEATTACK_EVENT_NTF(PKT_GSCLI_BEATTACK_EVENT_NTF p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLILS_LOGIN_REQ(PKT_CLILS_LOGIN_REQ p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLILS_LOGIN_ACK(PKT_CLILS_LOGIN_ACK p, CsdSocket_TCP peer){}
    public virtual void handle_PKT_CLIGT_HEARTBEAT_NTF(PKT_CLIGT_HEARTBEAT_NTF p, CsdSocket_TCP peer){}

}

